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 / vinay kabra

Answer is : 1 2 2
because

sizeof('3')takes 3 as character and so, size of a character
is 1 byte

sizeof("3") takes 3 as a string so, here strinf contains one
character 3 and end character '\0'. so, sizeof("3") gives o/p 2

and
sizeof(3) takes 3 as integer so size of an integer is 2 bytes

Is This Answer Correct ?    18 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #line used for?

1024


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

1047


What are local variables c?

1019


#include { printf("Hello"); } how compile time affects when we add additional header file .

1895


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

2182


What are the advantages of external class?

1067


What are the features of c languages?

1101


How pointer is different from array?

1076


What is the use of #include in c?

1083


Can you apply link and association interchangeably?

1125


Explain output of printf("Hello World"-'A'+'B'); ?

1494


What is the use of the function in c?

1017


What do you know about the use of bit field?

1046


What is a scope resolution operator in c?

1277


Differentiate call by value and call by reference?

963