C Quiz: printf & scanf

This C quiz tests the format strings of printf and scanf. You will predict formatted output with widths, precision and padding, pick the right conversion specifiers and learn why scanf needs addresses.

आसान 10 सवाल ~5 मिनट पास होने के लिए 80% C17

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

What does this print?

#include <stdio.h>

int main(void) {
    printf("%d + %d = %d\n", 2, 3, 2 + 3);
    return 0;
}
जवाब दिखाएं

C. 2 + 3 = 5 Each %d is replaced by the next argument in order: 2, 3 and the value of 2 + 3, which is 5. The expression is evaluated before printf sees it.

इस क्विज़ में क्या है

  • Conversion specifiers like %d, %f, %x, %c and %s
  • Width, precision, zero padding and left alignment
  • Printing a literal %
  • Why scanf takes &variable and what it returns
  • %lf in scanf vs %f in printf

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।