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...

the output will be

#include<stdio.h>
int main ()
{
int i;
i = 9/2;
printf("%i",i);
return 0;
}

Answer Posted / jac

The output will be 4. The division is being stored in a variable of type int - division operations upon it will comport to the rules of integer division, which says, "Divide but drop the remainder". Moreover, the formatting flag "%i" prints an integer value all the time, even if you try and pass it a floating-point type (which will probably give you garbage - without a cast, that is).

http://www.cs.cf.ac.uk/Dave/C/node4.html - search "integer division"
http://linux.die.net/man/3/printf - look for the "i" formatting string

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the applications of c language?

1012


How can I read/write structures from/to data files?

924


What is the difference between fread and fwrite function?

1033


Why do some versions of toupper act strangely if given an upper-case letter?

1037


Explain the array representation of a binary tree in C.

1166


Why is it usually a bad idea to use gets()? Suggest a workaround.

1689


What do you understand by normalization of pointers?

1005


How can you convert integers to binary or hexadecimal?

979


What is c method?

941


Explain how do you determine a file’s attributes?

999


Why structure is used in c?

1113


What do you mean by scope of a variable in c?

972


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

963


What are the features of c language?

1022


Explain argument and its types.

993