main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / k.thanigaivel
This output is
4 2 4
Explanation:
sizeof('1 or 2 or 3,......or n')=4
sizeof("0")=2
sizeof("10")=3
sizeof("100")=4
sizeof("1000")=5
sizeof("10000")=6
.
.
.
.
.
sizeof("n")=n
sizeof(1 or 2 or 3......or n)=4
Is This Answer Correct ? | 27 Yes | 25 No |
Post New Answer View All Answers
How can you pass an array to a function by value?
What is pragma in c?
How can I remove the trailing spaces from a string?
Why do we use int main?
Does c have enums?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
Can include files be nested?
Is sizeof a keyword in c?
What is structure padding and packing in c?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Why c language is called c?
What is NULL pointer?
Why is c still so popular?
What are the storage classes in C?
How can I handle floating-point exceptions gracefully?