C & C++ Programming Multiple Choice Questions - Set 8

1.       A variable which is visible only in the function in which it is defined, is called
(A) static variable         (B) auto variable
(C) external variable   (D) local variable
Answer: D
2.       The number of arguments supplied from the command line, by convention, is known as
(A) arg c             (B) arg v
(C) #define       (D) #include
Answer: A
3.       The keyword virtual precedes the inherited ................ specification.
(A) class                        (B) variable
(C) array            (D) pointer
Answer: A
4.       The inherited member access specification is to employ ................. within the derived class.
(A) class declaration   (B) private declaration
(C) public declaration (D) access declaration
Answer: D
5.       ................. is a unary operator that returns the memory address of its operand.
(A) &                   (B) ++
(C) _ _                (D) ||
Answer: A

6.       ................ is a stream connected to standard output.
(A) cin                (B) gets
(C) out               (D) cout
Answer: D
7.       The loop in which the statements within the loop are executed at least once is called
(A) do-while      (B) while
(C) for                (D) goto
Answer: A
8.       The control automatically passes to the first statement after the loop in
(A) continue statement           (B) break statement
(C) switch statement               (D) if statement
Answer: B
9.       The functions that are used to access the file in non-sequential fashion ............... and ...................
(A) seekf() , seekp()                 (B) seekg(), seekp()
(C) seekp(), seekf()                  (D) beg(), seekx()
Answer: B
10.    An exception is caught based on its ...............
(A) keyword                  (B) address
(C) type                          (D) pointer
Answer: C


Post a Comment

0 Comments