C++ multiple choice questions with answers pdf download






















Namespaces refer to the memory space allocated for names used in a program b. Namespaces refer to space between the names in a program c. Namespaces refer to packing structure of classes in a program. Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.

Namespaces refer to space between teh names in a program c. Namespaces refer to space between the names in a program d. Exception Handling b. Reflection c. Operator Overloading d. Polymorphic inheritance b. Multilevel inheritance c. Hierarchical inheritance d. Multiple inheritance. C language b. Java Language c. C language d. By making all the methods pure virtual in a class b. How do we declare an abstract class?

Which of the following is not an advantage of secondary memory a. It is cost-effective b. It has large storage capacity c. It has highest speed d. It is easily portable. What happens when a pointer is deleted twice? It can abort the program b. It can cause a failure c. It can cause an error d. It can cause a trap. C protected d.

Value of i assigned to C and then i incremented by 1 b. Value of i assigned to C d. In C language, a hexadecimal number is represented by writing a. Which of the following library function below by default aborts the program? Terminate b. Abort d. If a member needs to have unique value for all the objects of that same class, declare the member as a.

Global variable outside class b. Local variable inside constructor c. Static variable inside class d. Dynamic variable inside class. Which of the following below can perform conversions between pointers to related classes? How do we define a constructor? Vtables a. When class B is inherited from class A, what is the order in which the constructers of those classes are called a.

Class A first Class B next b. Class B first Class A next c. Which of the following is the most general exception handler that catches exception of any type?

In a group of nested loops, which loop is executed the most number of times? What is the Difference between struct and class in terms of Access Modifier? By default all the struct members are private while by default class members are public.

By default all the struct members are protected while by default class members are private. By default all the struct members are public while by default class members are private.

By default all the struct members are public while by default class members are protected. Inline functions are invoked at the time of a. Run time b. Compile time c. Depends on how it is invoked d. Both b and c above. What is shallow copy? A shallow copy creates a copy of the dynamically allocated objects too. A shallow copy just copies the values of the data as they are.

A shallow copy creates a copy of the statically allocated objects too d. What is deep copy? A deep copy creates a copy of the dynamically allocated objects too. A deep copy just copies the values of the data as they are. A deep copy creates a copy of the statically allocated objects too d. Input Iterator b. Backward Iterator c. Forward Iterator d. Both a and c above. What defines a general set of operations that will be applied to various types of data?

Template class b. Function template c. Class template d. Under which of the following circumstances, synchronization takes place? When the file is closed b. When the buffer is empty c. Explicitly, with manipulators d. Which of the following functions below can be used Allocate space for array in memory?

Realloc d. Assign an integer to variable i b. Give an error message c. Print the value of i d. Assign an float to variable i. STL is based on which of the following programming paradigms? Structured Programming b. Functional Programming d. STL is based on which of the following programmingparadigms?

If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block? Which of the following members do get inherited but become private members in child class a. Public b. Private c. All the above. Which looping process is best used when the number of iterations is known?

A digit b. An integer c. A character d. A word. Which of the following operators can be implemented as a nonmember operator? What is the implicit pointer that is passed as the first argument for nonstatic member functions? Which of the following operators can be overloaded? Which of the following operator cannot be overloaded? Which of the following operators below allow to define the member functions of a class outside the class?

Which of the following is not a valid conditional inclusions in preprocessor directives a. Junk value b. Syntax error c. Minimum number of temporary variable needed to swap the contents of 2 variables is: a.

There is nothing like a virtual constructor of a class. False b. This process is called as a. Static binding b. Dynamic Binding. Hello World b. Hello World! Syntax error b. Constructor 2 b. Constructor 4 c. Constrcutor 1 d. Type mismatch error. Your email address will not be published. Which classes allow primitive types to be accessed as objects?

Storage b. Many of the objective questions are asked in software jobs written interviews. Explain the difference between struct and class in terms of Access Modifier.

Guidelines for writing multiple choice questions. Writing the question or unfinished statement the stem. I only need the correct choice.. Please check the attached images. Your matched tutor provides personalized help according to your question details. Payment is made only after you have completed your 1-on-1 session and are satisfied with your session.

C Multiple Choice Questions covers all the important topics, which will help you to crack C interviews and placements. Join Co-production practitioners network.



0コメント

  • 1000 / 1000