the output will be
#include<stdio.h>
int main ()
{
int i;
i = 9/2;
printf("%i",i);
return 0;
}
Answers were Sorted based on User's Feedback
Answer / 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 |
What are the 3 types of structures?
What is the importance of c in your views?
what are the various memory handling mechanisms in C ?
How do you search data in a data file using random access method?
What is c mainly used for?
What is .obj file in c?
what is unsigened char and what is the difference from char
What is C language ?
Explain what is gets() function?
How many types of functions are there in c?
Can you assign a different address to an array tag?
What is #line in c?