B.Tech Students: Apply for Live Programming Internship C, C++, Java, Python ,Web page Designing, PHP C Data Types Quiz | C Programming Test

C Programming Quiz: Data Types

Q1. Which data type is used to store a single character in C?C में एकल अक्षर को संग्रहीत करने के लिए कौन सा डेटा प्रकार उपयोग किया जाता है?

Correct: char

`char` is used to store a single character in C.

Q2. What is the size of `int` on most 32-bit systems?32-बिट सिस्टम पर `int` का आकार क्या होता है?

Correct: 4 bytes

On 32-bit systems, `int` usually occupies 4 bytes.

Q3. Which data type is used for decimal numbers in C?C में दशमलव संख्याओं के लिए कौन सा डेटा प्रकार उपयोग किया जाता है?

Correct: float

`float` is used to store decimal numbers.

Q4. What is the output of sizeof(char)?sizeof(char) का आउटपुट क्या होगा?

Correct: 1

Size of `char` is always 1 byte as per C standard.

Q5. Which format specifier is used for float?float के लिए कौन सा फॉर्मेट स्पेसिफायर उपयोग किया जाता है?

Correct: %f

`%f` is used to print float values.

Q6. What does 'double' mean in C?C में 'double' का क्या अर्थ है?

Correct: double precision float

`double` is used for double precision floating-point numbers.

Q7. Which data type would you use for storing large integers?बड़ी पूर्णांक संख्याओं को संग्रहीत करने के लिए आप कौन सा डेटा प्रकार उपयोग करेंगे?

Correct: long

`long` is used to store larger integer values.

Q8. What is the size of `float` on most systems?अधिकांश सिस्टमों में `float` का आकार क्या होता है?

Correct: 4 bytes

Usually `float` is 4 bytes.

Q9. Which data type is used for true/false values in modern C?आधुनिक C में true/false मानों के लिए कौन सा डेटा प्रकार उपयोग किया जाता है?

Correct: bool

In C99 and later, `bool` is used for boolean values.

Q10. What header file is required to use `bool` in C?`bool` उपयोग करने के लिए कौन सी हेडर फ़ाइल आवश्यक है?

Correct:

`` is required to use `bool` in C.