main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?

Answer Posted / niru

2 2 2
it returns the size of the int.
if the compiler is 32bit, size of the int=4
o/p: 4 4 4
For example:
void main()
{
long int i;
clrscr();
printf("%d %d %d \n",sizeof(i),sizeof("3"),sizeof(3));
getch();
}
output:4 2 2

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between full, complete & perfect binary trees.

675


Why clrscr is used in c?

591


What are the properties of union in c?

594


What is a keyword?

750


What are the different types of data structures in c?

610






How can you increase the size of a dynamically allocated array?

648


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15056


Explain what are global variables and explain how do you declare them?

645


What is the g value paradox?

648


What is the purpose of void pointer?

603


Why is c still so popular?

620


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

667


What does. int *x[](); means ?

640


Are pointers really faster than arrays?

569


Why calloc is better than malloc?

574