C++ Type Checking Question:
Download Questions PDF

Is the size of character literals different in C and C++?
a) Implementation defined
b) Can't say
c) Yes, they are different
d) No, they are not different

C++ Type Checking Interview Question
C++ Type Checking Interview Question

Answer:

c) Yes, they are different

Download C++ Type Checking Interview Questions And Answers PDF

Previous QuestionNext Question
What is the output of this program?

#include <stdio.h>
int main()
{
char a = '12';

printf("%d", a);
return 0;
}
a) Compiler error
b) 12
c) 10
d) Empty
Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
a) 4
b) 1
c) Implementation dependent
d) Machine dependent