ProgrammingEasyTCS NQT · Infosys pattern
In C, sizeof(char) is:
- A. Always 1, by definition of the language
- B. Compiler-dependent, usually 4
- C. 2 bytes on 64-bit systems
- D. Equal to sizeof(int)
Correct answer: A. Always 1, by definition of the language
The C standard defines sizeof(char) as exactly 1; every other size is measured in units of char. The number of bits in that byte (CHAR_BIT) is usually 8.
More C Programming questions
- Which storage class makes a local variable keep its value between calls to the function?
- The end of a C string is marked by:
- Which declaration makes p a pointer to an int?
- A line such as #include <stdio.h> is processed by:
- Which printf format specifier is meant for printing a pointer value (an address)?
- What is printed? c printf("%d", 10 / 3 3);