Programming - C++ Language
You Are Here :: Home > C++ Language > Introduction - General Questions
43. |
What will be the output of the following arithmetic expression ? 5+3*2%10-8*6
|
A. |
-34 |
B.
|
-37 |
C.
|
-66
|
D.
|
-24
|
|
Answer: Option B
Explanation:
|
44. |
What will be the output of the following statement? printf( 3 + "goodbye");
|
A. |
goodbye |
B.
|
odbye |
C.
|
dbye
|
D.
|
bye
|
|
Answer: Option C
Explanation:
|
45. |
Which one of the following special symbols is allowed in a variable name?
|
A. |
| (pipeline) |
B.
|
* (asterisk) |
C.
|
- (hyphen)
|
D.
|
_ (underscore)
|
|
Answer: Option D
Explanation:
|
46. |
In a class, member variables are often called its _________, and its member functions are sometimes referred to as its behaviour, or ____________.
|
A. |
attributes, methods |
B.
|
none of these |
C.
|
values, morals
|
D.
|
data, activities
|
|
Answer: Option A
Explanation:
|
47. |
Which of these keywords are access specifiers?
|
A. |
near and far |
B.
|
opened and closed |
C.
|
table and row
|
D.
|
private and public
|
|
Answer: Option D
Explanation:
|
48. |
Use of __________ protects data from inadvertent modifications.
|
A. |
protect() member function |
B.
|
private access specifier |
C.
|
class protection operator, @
|
D.
|
public access specifier
|
|
Answer: Option B
Explanation:
|
« prev
next »