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
What are the main characteristics of c language describe the structure of ac program?
Why is c platform dependent?
Why & is used in scanf in c?
What does calloc stand for?
Why void main is used in c?
Why string is used in c?
Is calloc better than malloc?
Why dont c comments nest?
What is the concatenation operator?
What are the key features in c programming language?
Why void is used in c?
What are identifiers in c?
Where in memory are my variables stored?
What is memcpy() function?
In which layer of the network datastructure format change is done