questionStatement
|
answerA
|
answerB
|
answerC
|
answerD
|
answerE
|
Comeau C/C++ comes with its own
version of Standard C++ library called:
|
stdlib
|
libcomo
|
slibrary
|
clibrary
|
|
Choose the correct statements
regarding inline functions:<br/>1) It speeds up execution.<br/>2)
It slows down execution.<br/>3) It increases the code
size.<br/>4) It decreases the code size.<br/>5) It slightly
breaks your encapsulation.
|
1, 3
|
2, 4
|
2, 4, 5
|
1, 3, 5
|
1, 4
|
Choose the incorrect statement:
|
C++ allows any operator to be
overloaded.
|
Assignment operators cannot be
overloaded.
|
Operator precedence can be changed.
|
None of the above.
|
|
Choose the correct option for the
following program fragment:<br/>void main( )<br/>{<br/>int
x = 10 ;<br/>int &p = x ;<br/>cout << *(&p)
<< &x ;<br/>}
|
Prints 10 and the address of x.
|
Results in run time error.
|
Prints 10 and the address of p.
|
Results in compile error.
|
Both 1 and 3.
|
For a method to be an interface
between the outside world and a class, it has to be declared _____.
|
friend
|
protected
|
public
|
extern
|
|
What is the correct value which the
program returns to the operating system upon the successful completion of it?
|
-1
|
1
|
0
|
Programs do not return a value.
|
-
|
Which of the following operators
can be used to compare two variables?
|
:=
|
!=
|
equal
|
none
|
|
Which of the following is not a
valid escape code?
|
\t
|
\v
|
\f
|
\w
|
|
When requesting for multiple datum,
which of the following can work as a seperator?
|
A space
|
A tab character
|
A new line character
|
All of the above
|
|
Which of the following statements
is true?
|
To overload functions, different
return types of overloaded functions is a necessary condition.
|
To overload functions, different
return types along with different argument types is a necessary condition.
|
To overload functions, different
return types is not a necessary condition. Only argument types must be
different
|
None of the above.
|
|
Tuesday, October 20, 2015
c++ SAMPLE QUESTIONS
Labels:
TAP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment