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
How will you find a duplicate number in a array without negating the nos ?
What is character constants?
while initialization of array why we use a[][2] why not a[2][]...?
Is c is a high level language?
what is the syallabus of computer science students in group- 1?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
write a program to find out prime number using sieve case?
Why doesnt this code work?
What is the difference between text and binary i/o?
What does volatile do?
Explain what is the difference between functions abs() and fabs()?
What is volatile variable how do you declare it?
What does void main return?
What is the importance of c in your views?
differentiate built-in functions and user – defined functions.