UpdatedNew C QB-1
UpdatedNew C QB-1
1. Which one of the following is a loop construct that will always be executed once?
(a) For (b)while (c) switch (d) do-while
2. Which of the following is not a keyword in C?
(a) int (b) char (c) include (d) float
3. Range of unsigned char is?
(a) 0 to 255 (b) -127 to 128 (c) -128 to 127 (d) 0 to 256
4. What is the size of 'int' data type in C?
(a) 2 bytes (b) 4 bytes (c)8 bytes (d) Depends on the system
5. What does the '==' operator check?
(a) Assignment (b)Equality (c)Greater than (d) Less than
6. How many keywords are there in C?
(a) 32 (b) 45 (c) 23 (d) 67
7. What is a function?
(a) Looping structure (b) Block of code (c) unknown variable (d) None of these
8. Which header file uses gets()?
(a) Stdio.h (b) stdlib.h (c) conio.h (d) None of these
9. In switch statement, each case instance value must be-
(a) Constant (b) Variable (c) Special symbol (d) None of these
10. All preprocessor directives begin with _______ symbol.
(a) $ (b) ^ (c) # (d) @
11. Which one of the following is allowed in variable name?
(a) _(Underscore) (b) *(Astrisk) (c) |(Pipeline) (d) –(Hyphen)
12. Which one of the following is not a logical operator?
(a) && (b) || (c) & (d) !
13. The C programs are converted into machine language with the help of a _____________.
(a) Compiler (b) Editor (c) An OS (d) None of these
14. In C Program, ‘\t’ is used for-
(a) New line (b) Vertical tab (c) Horizontal tab (d) Back space
15. Who is the father of C Language?
(a) Dennis Ritchie (b) James Gosling (c) Steve Jobs (d) None of these
16. What is the syntax for multi line comment in C?
(a) // (b) */….*/ (c) /*…../* (d) /*……*/
17. What is sizeof() in C?
(a) Operator (b) macro (c) Function (d) None of these
18. ________ is an exit-controlled loop.
(a) For (b) while (c) do-while (d) None of these
19. 'const’ data types are used for?
(a) Unknown values (b) Constant Values (c) Dynamic variable values (d) None of these
20. #include<stdio.h> is a ________ directive.
(a) Macro Expansion (b) File Inclusion (c) Conditional Compilation (d) None of these
21. We cannot use the keyword ‘break; simply within_______.
(a) For (b) while (c) do-while (d) if-else
22. In which year, was C Language developed?
(a) 1972 (b) 1978 (c) 1980 (d) 1987
23. What is the default value of a static variable?
(a) 0 (b) 1 (c) garbage Value (d) None of these
24. To clear the output screen, which function is used?
(a) clrscn() (b) clrscrn() (c) crlscr() (d) clrscr()
25. _____ format specifier is used for unsigned integer.
(a) %ld (b) %ud (c) %u (d) %e
True / False-
26. The types of actual and formal arguments must be the same. (T/F)
27. gets () is an unformatted console I/O function. (T/F)
28. The preprocessor directives must end with a semicolon. (T/F)
29. In nested if statement we may have multiple else statements. (T/F)
30. While is an exit controlled loop. (T/F)