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



the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i&quo..

Answer / manomit mitra

4

Is This Answer Correct ?    48 Yes 8 No

the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i&quo..

Answer / sumesh

the output of this program will be 4.here i is an integer type not float.

Is This Answer Correct ?    17 Yes 3 No

the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i&quo..

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

the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i&quo..

Answer / nupur

it will return 0

Is This Answer Correct ?    23 Yes 27 No

Post New Answer

More C Interview Questions

What are Storage Classes in C ?

32 Answers   CTS, HP, IBM, Maharaja Whiteline, Tamil Nadu Open University TNOU, TATA, TCS, Wipro,


Difference between exit() and _exit() function?

0 Answers  


Write a program to generate prime factors of a given integer?

2 Answers  


What is wrong with this statement? Myname = 'robin';

0 Answers  


Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001

2 Answers  






what is the height of tree if leaf node is at level 3. please explain

0 Answers  


What are the advantages of using linked list for tree construction?

0 Answers  


What is preprocessor with example?

0 Answers  


without a terminator how can we print a message in a printf () function.

7 Answers   NIIT,


How many types of arrays are there in c?

0 Answers  


code for reverse alternate words from astring

1 Answers   IBM,


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


Categories