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
Explanation:
-
16. rand() function returns
- float value
- integer value
- any type
- none of above
Answer And Explanation
Answer: Option B
Explanation:
-
17. The compiler in C ignores all text till the end of line using
- //
- /
- */
- none of above
Answer And Explanation
Answer: Option A
Explanation:
-
18. Which operator in c can't be overloaded
- %
- +
- ::
- -
Answer And Explanation
Answer: Option C
Explanation:
-
19. Which operator has the highest priority
- ()
- []
- *
- /
Answer And Explanation
Answer: Option A
Explanation:
-
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
Explanation: