Revathi Satya Kondra has Published 101 Articles

When is copy constructor called in C++?

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 26-May-2025 16:41:09

996 Views

The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously. The copy constructor is used to Initialize one object from another of the same type. Copy ... Read More

Set find() function in C++ programming STL

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 22-May-2025 19:11:59

2K+ Views

In this article we are going to discuss the set::find() function in C++ STL, their syntax, working and their return values. What is Set in C++ STL? Sets in C++ STL are the containers which must have unique elements in a general order. Sets must have unique elements because the ... Read More

Catching base and derived classes exceptions in C++

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 07-May-2025 14:33:33

2K+ Views

To catch an exception for both base and derived classes, we need to put the catch block of the derived class before the base class. Otherwise, the catch block for the derived class will never be reached. This happens because C++ follows a top-down approach when checking catch blocks. So, ... Read More

C Program to find size of a File

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 07-May-2025 14:18:00

2K+ Views

The size of a file refers to the number of bytes it occupies in memory. In C, size of a file can be found by moving the file pointer to the end of the file and checking its position. The position indicates the number of bytes the file contains. The ... Read More

Print “Hello World” with empty or blank main in C++

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 07-May-2025 14:13:04

536 Views

In this problem, we will see how to print "Hello World" into the console, but we cannot write anything into the main function. This problem can be solved in different ways. Initially, we will create a global variable, then we will store the returned value of the printf() function into ... Read More

How to declare a pointer to a function in C?

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 06-May-2025 18:53:52

6K+ Views

In C, a pointer is a variable whose value is the address of another variable or memory block, i.e direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable or block address. Basic Pointer to a Function ... Read More

C++ program to append content of one text file to another

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 06-May-2025 18:53:08

1K+ Views

In C++, we can work with files to read, write, or even combine(append) their contents. Here, our task is to append the content of one text file to another. Imagine a scenario where we have two txt files which is named as 'source.txt' and 'destination.txt' files. So, with the help ... Read More

Zombie and Orphan Processes in Linux

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 06-May-2025 18:51:16

8K+ Views

Every program runs as a process in Linux operating system. When a process ends or gets disconnected from its parent, special types of processes can be created. These processes are known as zombie and orphan processes. Details about the zombie and orphan processes are given as follows: Zombie Processes A ... Read More

How to append a vector in a vector in C++?

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 02-May-2025 17:56:29

16K+ Views

In C++, a vector is like a array which can be used accordingly. If you want to combine (append) two vectors, you need to add all the elements of one vector to the end of another. This is called appending a vector in a vector. To append a vector in ... Read More

exit() vs _Exit() in C/C++

Revathi Satya Kondra

Revathi Satya Kondra

Updated on 02-May-2025 13:39:59

707 Views

In C/C++, both exit() and _Exit() are used to terminate a program. The exit() performs cleanup like flushing output, closing files, and calling functions, while _Exit() ends the program immediately without doing any cleanup. Now, let us learn the difference between exit() and _Exit() individually in C/C++. C++ exit() Function ... Read More

Advertisements