web analytics

Write down about the initialization of one dimensional array

Initialization of one dimensional array :  After an array is declared, its elements must be initialized. An array can be initialized either of the following stages, §  At compile time. §  At run time. Compile time initialization : User can initialize the elements of an array in the same way as the ordinary variables when they are declared. This … Read more

Write down about the declaration of one dimensional array.

Declaration of one dimensional array : Like any other variable, arrays must be declared before they are used. The general form of array declaration is,                    type variable_name[size]; The type specifies the type of elements that will be contained in the array, such as int, float etc. The size indicates the maximum number of element that … Read more

Write down about the three types of arrays.

One dimensional array:  A list of items can be given one variable name using only one subscript and such a variable is called a one dimensional array.               Example : int number[5]; Here in the example, 5 value of the variable number can be kept under the single variable number. Two dimensional array:  When by using an array … 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 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

What is constructor?

Constructor:A constructor is a ‘special’ function whose task is to initialize the objects of its class. It is special because its name is the same as the class name. A constructor is executed whenever object of its class is created. It is called constructor because it constructs the values of data members of the class. … Read more