C Programming and Output: MCQ questions with answers
CS Fundamentals (Placement), Unit 5. 60 C Programming and Output questions with explanations (CS Fundamentals (Placement)). Topics: C Programming and Output. Take a free test now.
Topics
- C Programming and Output: printf, prints, output, sizeof, declared, execute, return, pointer
Key terms: printf, prints, output, sizeof, declared, execute
Sample questions with answers
char c = 'A'; printf("%d", c); prints:
Options: A) A B) 65 C) 97 D) 1
Answer: B) 65. ASCII code.
printf("%d", 9 % 2); prints:
Options: A) 0 B) 1 C) 4 D) 4.5
Answer: B) 1. Odd number.
Which is NOT a C keyword?
Options: A) int B) static C) string D) volatile
Answer: C) string. C has no string keyword; strings are char arrays.