Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / ashwin

4 2 4

sizeof('3') means it will take ascii value which is an
integer, it shows size of integer.

sizeof("3") means, here it will treat it as an array, it
will print size of an array, so array contain '3' and '\0'
so out put is 2.

try size("3ashwin") it will give 8 as out put.

sizeof(3) means directly we asking size of an integer.

thank you

if is an wrong answer plz write correct answer to

molugu.ashwin@gamil.com

Is This Answer Correct ?    71 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mean by data types in c?

1036


Write a program to check armstrong number in c?

1134


Combinations of fibanocci prime series

1621


What is the difference between local variable and global variable in c?

1239


How does sizeof know array size?

1131


What is the difference between null pointer and wild pointer?

1204


What are the scope of static variables?

1197


How are portions of a program disabled in demo versions?

1299


What are the different categories of functions in c?

1138


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2698


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1448


What is function pointer c?

1123


What are the types of c language?

1039


Explain how are portions of a program disabled in demo versions?

1124


which is conditional construct a) if statement b) switch statement c) while/for d) goto

1225