C Programming Questions Answers - Chapter 1
-
15. Out of following program :
float x = 10.7;
int i;
i = (int) x;
print i;
- null
- error
- 10
- garbage value
Answer And Explanation
Answer: Option C
-
16. rand() function returns
- float value
- integer value
- any type
- none of above
Answer And Explanation
Answer: Option B
-
17. The compiler in C ignores all text till the end of line using
- //
- /
- */
- none of above
Answer And Explanation
Answer: Option A
-
20. What is the purpose of getc()
- read a character from STDIN
- read a character from a file
- read all file
- read file random
Answer And Explanation
Answer: Option B