C Language Questions
Q1. The _________ is a computer program that translates the source code into corresponding object code
(a) Compiler
(b) Assembler
(c) COBOL
(d) Interpreter
Answer: (a) Compiler
Q2. Which one is a special function in C system to tell the computer where the program start
(a) go()
(b) sub()
(c) main()
(d) event()
Answer: (c) main()
Q3. In a passage of text individual words and punctuation marks are called
(a) Tokens
(b) Strings
(c) Operator
(d) Identifier
Answer: (a) Tokens
Q4. Which of the following is not a data type in c
(a) Primary data type
(b) Secondary data type
(c) Derived data type
(d) User defined data type
Answer: (b) Secondary data type
Q5. If a=14, b=4 then a/b =
(a) 2
(b) 3
(c) 4
(d) 5
Answer: (b) 3
Q6. If a=14, b=4 then a%b =
(a) 2
(b) 4
(c) 5
(d) 6
Answer: (a) 2
Q7. If m=5, y=m++ then value of y and m would be _____ and _______
(a) 2 and 4
(b) 3 and 5
(c) 4 and 6
(d) 5 and 6
Answer: (d) 5 and 6
Q8. An _______ is a fixed size sequence collection of elements of the same data type
(a) integer
(b) function
(c) array
(d) pointer
Answer: (c) array
Q9. What is the action of strcat() function
(a) compare two strings
(b) concatenates two strings
(c) finds the length of a string
(d) copies one string over another
Answer: (b) concatenates two strings
Q10. What is the action of strcmp() function
(a) compare two strings
(b) copies one string over another
(c) finds the length of a string
(d) cut one string over another
Answer: (a) compare two strings
Q11. Automatic variable also referred to as
(a) Internal variable
(b) Global variable
(c) Local variable
(d) External variable
Answer: (a) Internal variable
Q12. The precedence of member operator is _________ than all arithmatic and relational operator
(a) lower
(b) higher
(c) equal
(d) None of the above
Answer: (b) higher
Q13. A bit field is a set of adjacent bits whose size can be from _________ bits in length
(a) 1 to 8
(b) 1 to 12
(c) 1 to 14
(d) 1 to 16
Answer: (d) 1 to 16
Q14. Which of the following function is used for sets the position to a desired point in the file
(a) putc()
(b) putw()
(c) fseek()
(d) getw()
Answer: (c) fseek()
Q15. Which of the following function is used for sets the position to the beginning of the file
(a) putw()
(b) getw()
(c) setw()
(d) rewind()
Answer: (d) rewind()
Practice Test Exam