Wednesday, 17 August 2016

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

1.       Which header file is used for screen handling function:-
(A) IO.H                         (B) STDLIB.H
(C) CONIO.H                (D) STDIO.H
Answer: D
Explanation:
The header file stdio.h contains definitions of constants, macros and types, along with function declarations for standard I/O functions.
2.       The variables in an array are called its ...............
(A) data                          (B) index
(C) elements                 (D) subscripts
Answer: C
3.       The declaration of a two dimensional array called list with dimensions 4 X 9 is represented as ..................
(A) int list [4] [9]            (B) int list [9][4]
(C) int list [4,9]              (D) int list[9,4]
Answer: A
4.       In a two dimensional array called list with dimensions 4 X 9 the element 2,3 can be accessed by using the expression ................
(A) list[3][2]        (B) list[2,3]
(C) list[2][3]        (D) list[3,2]
Answer: C
5.       The purpose of the code, answer = toupper(ans); is to ensure that ................
(A) answer will be rounded to the next larger integer
(B) the first letter in answer will be a capital letter
(C) answer will contain all capital letters
(D) answer will contain no numeric values
Answer: C

6.       The content of file will be lost if it is opened in
(A) w mode       (B) w+ mode
(C) a mode        (D) a+ mode
Answer: A
Explanation:
When the mode is writing, the contents are deleted and the file is opened as a new file.
7.       The .............. storage class is used to declare reference variable.
(A) register        (B) static
(C) extern          (D) auto
Answer: C
8.       The name of all functions end with a
(A) pair of parenthesis            (B) semicolon
(C) braces                                 (D) colon
Answer: A
9.       A float variable can store any variable within the range of
(A) −1.7 ×1038 to 1.7 ×1038
(B) − 3.4 ×1038 to 3.4 ×1038
(C) − 7.2 ×1038 to 7.2 ×1038
(D) −1.2 ×1038 to 1.2 ×1038
Answer: B
10.    scanf() can be used for reading
(A) double character               (B) single character
(C) multiple characters           (D) no character
Answer: C


0 comments:

Post a Comment

UGC NET Computer Science

Computer GK App