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 is the total generic pointer type?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Explain how do you use a pointer to a function?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Tell me what is null pointer in c?
What is the best style for code layout in c?
what type of questions arrive in interview over c programming?
What is bubble sort technique in c?
What is time complexity c?
Can you please explain the scope of static variables?
difference between object file and executable file
What do you mean by dynamic memory allocation in c?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Why are all header files not declared in every c program?