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


Please Help Members By Posting Answers For Below Questions

formula to convert 2500mmh2o into m3/hr

509


What is pointer and structure in c?

583


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

632


What is structure in c explain with example?

658


What is the explanation for prototype function in c?

579






Where register variables are stored in c?

560


What are two dimensional arrays alternatively called as?

676


How do you define structure?

575


Who is the founder of c language?

696


What is #line?

621


Tell me is null always defined as 0(zero)?

683


Should a function contain a return statement if it does not return a value?

605


What is a list in c?

631


what are the facialities provided by you after the selection of the student.

1666


praagnovation

1789