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

Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1091


Is fortran faster than c?

1041


How many header files are in c?

1038


Are pointers integers in c?

1073


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

1049


Why we use void main in c?

1163


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2806


What do you understand by normalization of pointers?

1058


Is it better to use malloc() or calloc()?

1112


c language interview questions & answer

1958


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4283


Explain the difference between exit() and _exit() function?

1170


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

3151


Why doesnt long int work?

1035


Why do we use & in c?

998