quiz programming in c
TRANSCRIPT
-
8/4/2019 QUIZ Programming in C
1/31
Programming inC
By
Mr. Deshbhratar A. S.
Programming In C
-
8/4/2019 QUIZ Programming in C
2/31
1. Which of the following is
the proper declaration of apointer?
A. int x;
B. int &x;C. ptr x;D. int *x;
9/23/11 22 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
3/31
1. Which of the following is
the proper declaration of apointer?
A. int x;
B. int &x;C. ptr x;D. int *x;
9/23/11 33 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
4/31
2. Which of the following is
the proper keyword orfunction to allocate memoryin C?
A. New
B. Malloc
C. Create
D. value
9/23/11 44 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
5/31
2. Which of the following is
the proper keyword orfunction to allocate memoryin C?
A. New
B. MallocC. CreateD. value
9/23/11 55 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
6/31
3. Which of the following
about the C comments isincorrect?A. C comments can go over multiple lines
B. Comments can start anywhere in the line
C. A line can contain comments without any languagestatements
D. Comments can occur within comments
9/23/11 66 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
7/31
3. Which of the following
about the C comments isincorrect?A. C comments can go over multiple lines
B. Comments can start anywhere in the line
C. A line can contain comments without any languagestatements
D. Comments can occur within comments
9/23/11 77 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
8/31
-
8/4/2019 QUIZ Programming in C
9/31
4. Which of the followingrepresents true statement either x
is in the range of 10 and 50 or y iszero.A. x >= 10 && x =10 && x < =50) || y = 0
9/23/11 99 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
10/31
5. Which of the C loops is apre-test loop.
A. do-while
B. for
C. while
D. Both while and for
E. both for and do-while
9/23/11 1010 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
11/31
5. Which of the C loops is apre-test loop.
A. do-while
B. for
C. while
D. Both while and for
E. both for and do-while
9/23/11 1111 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
12/31
6. Which of the followingis not a comparative
operator in C.A. D. >=
9/23/11 1212 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
13/31
6. Which of the followingis not a comparative
operator in C.A. D. >=
9/23/11 1313 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
14/31
7. Any Function bydefault return an_____________ value.
A. int
B. char
C. float
D. double
9/23/11 1414 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
15/31
7. Any Function bydefault return an_____________ value.
A. int
B. char
C. float
D. double
9/23/11 1515 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
16/31
8. Which of the following isnot a correct variable type?
A) float
B) real
C) int
D) double
9/23/11 1616 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
17/31
8. Which of the following isnot a correct variable type?
A) float
B) real
C) int
D) double
9/23/11 1717 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
18/31
9. Evaluate! (1 &&! (0 ||1)).
A) True
B) False
C) Un-evaluableD) Both A and B
9/23/11 1818 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
19/31
9. Evaluate! (1 &&! (0 ||1)).
A) True
B) False
C) Un-evaluableD) Both A and B
9/23/11 1919 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
20/31
-
8/4/2019 QUIZ Programming in C
21/31
10. C is called as ________
A. High level language
B. Object oriented language
C. Functional (Procedural) languageD. Machine level language
9/23/11 2121 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
22/31
11. C was developed in ?
A. 1960
B. 1972
C. 1978D. 1969
9/23/11 2222 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
23/31
11. C was developed in ?
A. 1960
B. 1972
C. 1978D. 1969
9/23/11 2323 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
24/31
12. Which of the following iscorrect basic (Unformatted)
I/O function?
A. getch();
B. printf();C. scanf();
D. Both B & C
9/23/11 2424 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
25/31
12. Which of the following iscorrect basic (Unformatted)
I/O function?
A. getch();
B. printf();C. scanf();
D. Both B & C
9/23/11 2525 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
26/31
13. if-else-if ladder isused?
A. When there are multiple conditionsto be checked
B. When there is only one condition tobe checked
C. Both A & B
D. None of these
9/23/11 2626 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
27/31
13. if-else-if ladder isused?
A. When there are multiple conditionsto be checked
B. When there is only one condition tobe checked
C. Both A & B
D. None of these
9/23/11 2727 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
28/31
14. Size required to storean Integer element in
memory is ______A. 2 bytesB. 1 bytes
C. 8 bitsD. 2 bits
9/23/11 2828 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
29/31
14. Size required to storean Integer element in
memory is ______A. 2 bytesB. 1 bytes
C. 8 bitsD. 2 bits
9/23/11 2929 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
30/31
15. Range of an integerconstant on a 16 bit
machine is ______A) -128 to 127B) 0 to 65535
C) -32768 to 32767D)3.4E-38 to 3.4E37
9/23/11 3030 Mr. Deshbhratar A. S.
-
8/4/2019 QUIZ Programming in C
31/31
15. Range of an integerconstant on a 16 bit
machine is ______A) -128 to 127B) 0 to 65535
C) -32768 to 32767D)3.4E-38 to 3.4E37
9/23/11 3131 Mr Deshbhratar A S