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 |
I need a sort of an approximate strcmp routine?
What is a stream?
Is c functional or procedural?
Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A
How can I make it pause before closing the program output window?
Result of the following program is main() { int i=0; for(i=0;i<20;i++) { switch(i) case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf("%d,",i); } } a)0,5,9,13,17 b)5,9,13,17 c)12,17,22 d)16,21 e)syntax error
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch
What is the difference function call by value & function call by reference?
how to copy a string without using c function
Differentiate between new and malloc(), delete and free() ?
What does 3 periods mean in texting?
Why ca not I do something like this?