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));
}

Answer Posted / karen

It is theoretically possible for the answer to vary
depending on characteristics of the system. This is why it
is always best to use sizeof instead of assuming the size
of a datatype. This line is equivalent to:

printf("\n %d %d %d",sizeof(char),sizeof(char[2]),sizeof
(int));

The middle is char[2] because it contains 3 and \0.

On my x86 windows 7 system, this program outputs 1 2 4.
Your numbers may be different due to system architecture
differences.

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using macro in c language?

1072


What is struct node in c?

1024


Explain the Difference between the New and Malloc keyword.

1081


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1849


Why do we use int main?

1045


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1102


What is a pointer in c plus plus?

1224


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1203


What is an operator?

1021


What is logical error?

1068


How can I split up a string into whitespace-separated fields?

1006


Explain enumerated types.

980


Differentiate between full, complete & perfect binary trees.

1055


Why can’t we compare structures?

1229


Can we assign string to char pointer?

1045