The following code gives output as 1, 4, 4 in C whereas 1, 1, 4 in C++
#include<stdio.h>
int main()
{
char ch = 'A'; //initialise
//printing output
printf("%d, %d, %d", sizeof(ch), sizeof('A'), sizeof(3.14f));
return 0;
}
The following code gives output as 1, 4, 4 in C whereas 1, 1, 4 in C++
#include<stdio.h>
int main()
{
char ch = 'A'; //initialise
//printing output
printf("%d, %d, %d", sizeof(ch), sizeof('A'), sizeof(3.14f));
return 0;
}