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 / deepali chandra

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

sizeof("3") takes 3 as a string so, 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 ?    17 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

main() { printf("hello"); fork(); }

1253


How can type-insensitive macros be created?

1220


What is a char c?

1092


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

2232


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

6024


What is the usage of the pointer in c?

1201


Difference between malloc() and calloc() function?

1273


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2373


Explain what is the concatenation operator?

1239


What is extern keyword in c?

1193


Do you know pointer in c?

1113


How can you check to see whether a symbol is defined?

1145


What is an operator?

1131


What is the difference between %d and %i?

1150


What are near, far and huge pointers?

1120