Tuesday, 7 August 2012

80 TOP C++ Multiple choice questions and Answers for freshers pdf download free

1. Which of the following languages is a subset of C++ language?
2. Which of the following correctly describes C++ language?
3. Which of the following keyword supports dynamic method resolution?
4. Which of the following language is not supported by C++?
5. Which of the following language feature is not an access specifier in C++?
6. What does STL stand for?
7. Which of the following is the most common way of implementing C++?
8. What is the implicit pointer that is passed as the first argument for nonstatic member functions?
9. If X is the name of the class, what is the correct way to declare copy constructor of X?
10. Which of the following operator cannot be overloaded?
11. Which of the following operators can be overloaded?
12. How do we declare an abstract class?
13. How do we declare an ‘interface’ class?
14. How many copies of a class static member are shared between objects of the class?
15. Which of the following is true about const member functions?
16. When is std::bad_alloc exception thrown?
17. Which header file should we include for using std::auto_ptr?
18. STL is based on which of the following programming paradigms?
19. Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
20. Which of the following is the most general exception handler that catches exception of any type?
21. Which type of class has only one unique value for all the objects of that same class?
22. Which of the following correctly describes the meaning of‘namespace’ feature in C++?
23. Which of the following is the most general exception handler that catches exception of ‘any type’?
24. Which of the following relationship is known as inheritance relationship?
25. Which of the following operators can be implemented as a nonmember operator?
26. Which of the STL containers store the elements contiguously (in adjacent memory locations)?
27. Which of the following is not recommended in a header file?
28. If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?
29. Which of the following is the most preferred way of throwing and handling exceptions?
30. If class A is friend of class B and if class B is friend of class C, which of the following is true?
31. The conditional compilation
32. Originally ‘C’ was developed as:
33. Minimum number of temporary variable needed to swap the contents of 2 variable is:
34. A direct access file is:
35. Which of the following is not an advantage of secondary memory
36. An inverted file
37. Which of the following is not a file operation:
38. Which of the following is not a component of file system
39. Seek time is
40. Latency time is:
41. ‘Prime area’ in context of file system is defined as
42. The two types of file structure existing in VSAM file are
43. In multi-list organization
44. Which of the following is/are advantages of cellular partitioned structure:
45. *ptr++ is equivalent to:
46. Statement scanf(“%d”,80);
47. Value of ix+j, if i,j are integer type and ix long type would be
48. In a C language ‘3’ represents
49. In C language, a hexadecimal number is represented by writing
50. Expression C=i++ causes
51.  Each pass through a loop is called a/an
52.  Which looping process checks the test condition at the end of the loop?
53.  A continue statement causes execution to skip to
54.  In a group of nested loops, which loop is executed the most number of times?
55.  The statement  i++;  is equivalent to
56.  Which looping process is best used when the number of iterations is known?
57.  What's wrong?  for (int k = 2, k <=12, k++)
58.  What's wrong?  while( (i < 10) && (i > 24))
59.  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?
60.  What's wrong?  (x = 4 && y = 5) ? (a = 5) ; (b = 6);
61. Which of the following operators below allow to define the member functions of a class outside the class?
62. Every class has at least one constructor function, even when none is declared.
63. How do we define a constructor?
64. Can constructors be overloaded?
65. Which of the following below can perform conversions between pointers to related classes?
66. An abstract class can be instantiated.
67. The default access level assigned to members of a class is ___________.
68. Which classes allow primitive types to be accessed as objects?
69. Which of the following library function below by default aborts the program?
70. What defines a general set of operations that will be applied to various types of data?
71. What happens when a pointer is deleted twice?
72. There is nothing like a virtual constructor of a class.
73. What is the Difference between struct and class in terms of Access Modifier?
74. Vtables
75. C++ provides facility to specify that the compiler should match function calls with the correct definition at the run time. This process is called as
76. By default, all members of a class have ___________ access for all its members.
77. Which operator is used to define a member of a class from outside the class definition itself?
78. What is a constructor?
79. if no constructor is declared, the compiler assumes the class to have a default constructor with no arguments
80. How would you read the expression x.y as?

No comments: