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 the height of tree if leaf node is at level 3. please explain

2089


If the size of int data type is two bytes, what is the range of signed int data type?

977


Which driver is a pure java driver

1536


shorting algorithmS

2198


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

10142


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2868


What is indirection in c?

1025


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

1056


Can a program have two main functions?

1065


FILE PROGRAMMING

2181


What are different types of operators?

994


how can use subset in c program and give more example

1933


How can I direct output to the printer?

1277


What is the general form of a C program?

981


how many key words availabel in c a) 28 b) 31 c) 32

1012