Q. What is the output of this code?

Code:
#include <stdio.h>
int main() {
    printf("%d", sizeof('A'));
    return 0;
}
  • (A) 1
  • (B) 2
  • (C) 4
  • (D) Depends on compiler
πŸ’¬ Discuss
βœ… Correct Answer: (C) 4
Explanation: 'A' is treated as int in C, hence size is 4 bytes.
Explanation by: Mr. Dubey
'A' is treated as int in C, hence size is 4 bytes.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
72
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate