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 is 1f in c?
write a C program to print the program itself ?!
What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?
What is the maximum no. of arguments that can be given in a command line in C.?
i got 75% in all semester am i eligible for your company
What are register variables? What are the advantage of using register variables?
What are derived data types in c?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
How we can write a value to an address using macro..?
write a c program to change only the 3rd bit of the particular number such that other bits are not affected.. if bitnum=10(say.. it can be any no..
Why doesn't C have nested functions?
here is a link to download Let_Us_C_-_Yashwant_Kanetkar