C Quiz: Data Types & sizeof

This C quiz covers the basic data types (char, int, double and friends) and the sizeof operator. You will predict output, spot code that does not compile and learn which sizes C guarantees and which depend on the platform.

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

मोड चुनें

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

सैंपल सवाल

सवाल 1 / 10

What does this print?

#include <stdio.h>

int main(void) {
    printf("%zu\n", sizeof(char));
    return 0;
}
जवाब दिखाएं

B. 1 sizeof(char) is 1 by definition on every platform, because sizeof measures sizes in units of char. It does not count bits, so 8 is the trap.

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

  • char, int, float, double and their usual sizes
  • What the C standard guarantees about type sizes
  • Counting array elements with sizeof
  • Unsigned wrap-around and const variables
  • Valid variable names

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

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

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

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

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