web analytics

What is #include directive?

#include directive:  C programs are divided into modules or functions. Some functions are written by users and some are stored in C library. Library functions are grouped category wise and stored in different files known as header files. To access the file stored in the library, it is necessary to tell the compiler about the … Read more

Define preprocessor, function, compile time, run time.

Preprocessor: It is a program that process the source code before it passes through the compiler. Function: A function is a subroutine that may include one or more statements designed to perform specific tasks. For C programming functions are as building blocks. Compile time: Compile time refers to the event that occur during the compilation process. Run time: Run … Read more

Discuss the operations of data structures.

Operations of Data Structures: The particular data structure that one chooses for a given situation depends largely on the frequency with which specific operations are performed. Following are some most frequent operations. Traversing: Traversing means accessing the records exactly once so that those records can be processed as demanded.  Searching: Searching means finding out one … Read more

Explain different types of data structures.

Data structure means how the data is organized in memory. There different kind of data structures. Some are used to store the data of same type and some for different types of data. Different types of data structures help different types of operations of data structures too. Data structure is a particular way of storing and … Read more

What is data structure?

Data Structure:  Data structure means how the data is organized in memory. There different kind of data structures. Some are used to store the data of same type and some for different types of data. Different types of data structures help different types of operations of data structures too. Data structure is a particular way of … Read more

What is parameterized constructor? Give an example.

Parameterized Constructor: We know that when we create an object the constructor function gets execution automatically. Consider the following lines of codes, constructor(){ //this is the constructor function a=1; //initializing }void main(){ constructor ob1,ob2; } When this executed the value of ‘a’ for both ob1 and ob2 sets to 1. But when we want different … Read more

What is namespace?

Namespace: Namespace defines a scope for the identifiers that are used in the program. To use we will do the following      using namespace namespace_name; here, at namespace_name we will give the name of the namespace we want to use. Supposing that we are writing the following,      using namespace std; here, std is the … Read more

What is function overloading? Discuss this.

Function Overloading: Overloading refers to the use of the same thing for different purposes. When the same name for different functions is used that is called function overloading. The functions are then distinguished by their parameters or argument lists. Functions can be overloaded by changing, increasing or decreasing their arguments, float add(float a, float b)int … Read more