Examveda

What will be the output of the following C++ code?
#include<stdio.h>
int main(int argc, char const *argv[])
{
	char a = 'a';
	printf("%d\n", (int)sizeof(a));
	return 0;
}

A. Output in C is 1 and in C++ is 4

B. Output in C is 4 and in C++ is 1

C. Output in C is 1 and in C++ is 1

D. Output in C is 4 and in C++ is 4

Answer: Option C


Join The Discussion

Related Questions on Introduction to C plus plus