The document contains 26 multiple choice questions about the C programming language. Some key points covered include:
- Real constants in C can be expressed in fractional or exponential form
- The C language was developed by Dennis Ritchie at AT&T's Bell Laboratories in the United States in 1972
- Keywords in C are reserved words that cannot be used as variable or function names
- Format specifiers like %f, %d etc are used in printf statements to specify how data should be displayed
The document contains 26 multiple choice questions about the C programming language. Some key points covered include:
- Real constants in C can be expressed in fractional or exponential form
- The C language was developed by Dennis Ritchie at AT&T's Bell Laboratories in the United States in 1972
- Keywords in C are reserved words that cannot be used as variable or function names
- Format specifiers like %f, %d etc are used in printf statements to specify how data should be displayed
The document contains 26 multiple choice questions about the C programming language. Some key points covered include:
- Real constants in C can be expressed in fractional or exponential form
- The C language was developed by Dennis Ritchie at AT&T's Bell Laboratories in the United States in 1972
- Keywords in C are reserved words that cannot be used as variable or function names
- Format specifiers like %f, %d etc are used in printf statements to specify how data should be displayed
1. The real constant in C can be expressed which of the following forms ?
A. Fractional form only
B. Exponetial form only C. ASCII form only D. Both Fractional and Exponetial
2. The statement char ch='z' would store in ch A. The character Z B. ASCII value of Z C. Z along with the single inverted commas D. Both (1) and (2)
3. C language has been developed by ? A. Ken Thompson B. Dennis Ritchie C. Peter Norton D. Martin Richards
4. A C variable cannot start with ? A. An alphabet B. A number C. A special symbol other than underscore D. Both (2) and (3)
5. Which of the following statements is wrong ? A. INT=123; B. val='A' * 'B'; C. is=20 * 'T' D. count+5=res;
6. C programs are convrted into the machine language with the help of ? A. An editor B. Compiler C. An operating system D. None of the above
7. A character variable can at a time score ? A. 1 character B. 8 characters C. 254 characters D. None of the above
8. The maximun value that an integer constant can have is ? A. -32767 B. 32767 C. 1.7014e+38 D. - 1.7014e+38
9. Which of the following search algorithm requires a sorted array? A. Linear search B. Hash search C. Binary search D. All of the above Answer : C 10. What is %f, %d, %s and %c? A. Number Specifier B. Format Specifier C. Access Specifier D. None of the above Answer : B 11. Which of the following is correct set of keywords? A. unsigned, external, typedef, signed B. unsigned, volatile, typedef, every C. unsigned, volatile, typedef, sizeof D. None of the above Answer : C
12. The keywords are also called A. Safe words B. Static words C. Reserved words
D. Reused words Answer B 13. Which is the correct syntax to declare constant pointer?
A. int *const constPtr; B. *int constant constPtr; C. const int *constPtr; D. A and C both Answer D 14. In which linked list last node address is null?
A. Doubly linked list B. Circular list C. Singly linked list D. None of the above Answer C 15. What is Dequeue? A. Elements can be added from front B. Elements can be added to or removed from either the front or rear C. Elements can be added from rear D. None of the above Answer : B
16. The "C" language is A. Context free language B. Context sensitive language C. Regular language D. None of the above Answer : A 17. The _______ memory allocation function modifies the previous allocated space.
A. calloc B. free C. malloc D. realloc Answer: D 18. To represent hierarchical relationship between elements, which data structure is suitable?
A. Priority B. Tree C. Dqueue D. All of the above Answer: B
19. The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print? A. 10 B. 0 C. 12 D. 1 Answer : D 20. Which one of the following sentences is true ? A. The body of a while loop is executed at least once. B. The body of a do ... while loop is executed at least once. C. The body of a do ... while loop is executed zero or more times. D. A for loop can never be used in place of a while loop. Answer : B 21. What is the work of break keyword? A. Halt execution of program B. Restart execution of program C. Exit from loop or switch statement D. None of the above. Answer C 22. Which operators are known as Ternary Operator? A. ::, ? B. ?, : C. ?, ;; D. None of the above Answer B 23. Which is the right way to declare constant in C?
A. int constant var =10; B. int const var = 10; C. const int var = 10; D. B & C Both Answer D 24. What is C Tokens?
A. The smallest individual units of c program B. The basic element recognized by the compiler C. The largest individual units of program D. A & B Both Answer D 25. perror( ) function used to ? A. Work same as printf() B. prints the error message specified by the compiler C. prints the garbage value assigned by the compiler D. None of the above Answer B 26. C Language developed at _____? A. AT & T's Bell Laboratories of USA in 1972 B. AT & T's Bell Laboratories of USA in 1970 C. Sun Microsystems in 1973 D. Cambridge University in 1972 Answer A