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 / k.thanigaivel

This output is
4 2 4

Explanation:
sizeof('1 or 2 or 3,......or n')=4

sizeof("0")=2
sizeof("10")=3
sizeof("100")=4
sizeof("1000")=5
sizeof("10000")=6
.
.
.
.
.
sizeof("n")=n

sizeof(1 or 2 or 3......or n)=4

Is This Answer Correct ?    27 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a constant pointer in C

1116


Is null always defined as 0(zero)?

1068


How to get string length of given string in c?

1038


Write a code to generate a series where the next element is the sum of last k terms.

1189


What do you understand by friend-functions? How are they used?

1178


What are the types of pointers?

1068


What are near, far and huge pointers?

1033


What is time null in c?

1037


Why is c still so popular?

1025


What are structural members?

977


How can I change their mode to binary?

1080


What's the best way of making my program efficient?

1059


Why use int main instead of void main?

1086


How would you rename a function in C?

1015


Explain what is the benefit of using const for declaring constants?

994