C++ Language INTERVIEW QUESTION & ANSWERS
21. |
What is the difference between class and objects? |
|
Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects. A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don’t change. |
22. |
What is static class member? |
|
A static data member has a property that all instances of the containing class share this one data member. |
23. |
What are methods and fields? |
|
A class can have members. Methods and fields are two important members of classes. Member functions are known as methods and data members are known as fields. |
24. |
What is an array? |
|
An array is a collection of identical data objects which are stored in consecutive memory locations under a common heading or a variable name. In other words, an array is a group
or a table of values referred to by the same variable name. The individual values in an array are called elements. Array elements are also variables. |
25. |
What is a character array? |
|
The procedure for declaring character array is almost the same as for other data types such as integer or floating point. One can declare the character array by means of alphanumeric characters.
|