Professional Documents
Culture Documents
a) Nicolas Wirth
b) Donald Knuth
c) Bjarne Stroustrup
d) Ken Thompson
a) /
b) //
c) /* and */
d) None of these
d) None of these
a) an insertion operator
b) put to operator
c) either a or b
d) None of these
a) an extraction operator
d) get to operator
6. When a language has the capability to produce new data type, it is called
a) Extensible
b) Overloaded
c) Encapsulated
d) Reprehensible
a) perform the action of sending the value of expression listed as its right to the outputs
strewn as the left.
a) Rrick Mascitti
b) Bjarne Stroustrup
c) Donald Knuth
d) Ken Thompson
9. What is a reference?
a) an operator
d) None of these
a) a object is declared
b) an object is used
c) a class is declared
d) a class is used
a) C++
b) Java
c) Eiffel
c) functions with same name and same number and type of arguments
a) a object is declared
b) an object is used
c) a class is declared
d) a class is used
a) is not allowed
b) can't have a constructor
c) both a & b
d) None of these
a) one argument
b) two arguments
c) three arguments
d) Zero arguments
c) both a & b
d) None of these
a) a member function
b) an operator
c) a class function
d) a method
a) protected
b) public
c) private
d) None of these
a) C language
b) Java Language
c) C# language
d) B language
22. Which of the following correctly describes C++ language?
a) Statically typed language
b) Dynamically typed language
c) Both Statically and dynamically typed language
d) Type-less language
23. Which of the following keyword supports dynamic method resolution?
a) Abstract
b) Virtual
c) Dynamic
d) Typeid
24. Which of the following language is not supported by C++?
a) Exception Handling
b) Reflection
c) Operator Overloading
d) Namespaces
25. Which of the following language feature is not an access specifier in C++?
a) Public
b) Private
c) Protected
d) Internal
27. Which of the following is the most common way of implementing C++?
b) C++ programs are first compiled to intermediate code by a compiler and then
executed by a virtual machine
28. What is the implicit pointer that is passed as the first argument for nonstatic member
functions?
a) ‘self’ pointer
b) std::auto_ptr pointer
c) ‘Myself’ pointer
d) ‘this’ pointer
29. If X is the name of the class, what is the correct way to declare copy constructor of X?
a) X(X arg)
b) X(X* arg)
c) X(const X* arg)
a) = (assignment operator)
b) == (equality operator)
c) sizeof operator
d) ?: (conditional operator)
a) By providing at least one pure virtual method (function signature followed by ==0;)
in a class
b) By declaring at least one method abstract using the keyword ‘abstract’ in a class
b) By making all the methods abstract using the keyword ‘abstract’ in a class
34. How many copies of a class static member are shared between objects of the class?
b) A copy is created only when at least one object is created from that class
c) A copy of the static member is created for each instantiation of the class
b) const members can be invoked only on const objects and not on nonconst objects
c) When type requested for new operation is considered bad, this exception is thrown
a) <memory>
b) <alloc>
c) <autoptr>
d) <smartptr>
a) Structured Programming
c) Functional Programming
39. Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
a) Namespaces refer to the memory space allocated for names used in a program
d) namespaces provide facilities for organizing the names in a program to avoid name
clashes
40. Which of the following is the most general exception handler that catches exception of any
type?
a) catch(std::exception)
b) catch(std::any_exception)
c) catch(…)
d) catch()
41. What is the correct value to return to the operating system upon the successful completion
of a program?
a) -1
b) 1
c) 0
d) Programs do not return a value.
42. What is the only function all C++ programs must contain?
a) start()
b) system()
c) main()
d) program()
43. What punctuation is used to signal the beginning and end of code blocks?
a) { }
d) ( and )
a) .(dot)
b) ;(semi-colon)
c) :(colon)
a) */ Comments */
b) ** Comment **
c) /* Comment */
d) { Comment }
a) float
b) real
c) int
d) double
47. Which of the following is the correct operator to compare two variables?
a) :=
b) =
c) equal
d) ==
a) &
b) &&
c) |
d) |&
a) True
b) False
c) Unevaluatable
d) None of above
50. Which of the following is pure object oriented language
a) C++
b) ADA
c) JAVA
d) C