main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
Answer Posted / karen
It is theoretically possible for the answer to vary
depending on characteristics of the system. This is why it
is always best to use sizeof instead of assuming the size
of a datatype. This line is equivalent to:
printf("\n %d %d %d",sizeof(char),sizeof(char[2]),sizeof
(int));
The middle is char[2] because it contains 3 and \0.
On my x86 windows 7 system, this program outputs 1 2 4.
Your numbers may be different due to system architecture
differences.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
Are global variables static in c?
What is an identifier?
What is ctrl c called?
How to declare a variable?
How pointers are declared?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
What does the error 'Null Pointer Assignment' mean and what causes this error?
What do you mean by c what are the main characteristics of c language?
Why is c called c not d or e?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
Differentiate between functions getch() and getche().
What is a stream water?
How many types of arrays are there in c?
Differentiate call by value and call by reference?
what is the difference between 123 and 0123 in c?