main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}

Answer Posted / hemachandar

the first ('3') value goes to char., so it takes 1.
then for second ("3") value takes the string., string value takes 2.
for third (3), its int., so it takes the value of 2.

Every printf takes the values from right to left, so it takes the output as 2 2 1.
Simple!!!

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does free() know explain how much memory to release?

797


What is the difference between array and pointer?

753


Explain the advantages of using macro in c language?

749


What is void c?

764


What is union and structure?

756






How can I get back to the interactive keyboard if stdin is redirected?

862


explain what are actual arguments?

808


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

823


Explain what is the benefit of using an enum rather than a #define constant?

962


What are integer variable, floating-point variable and character variable?

833


Can static variables be declared in a header file?

801


Describe the header file and its usage in c programming?

800


What are shell structures used for?

772


What are the different types of endless loops?

807


What is a program flowchart?

795