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 |
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
how to return 1000 variables from functio9n in c?plz give me code also
#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }
Input is "Jack and jill went up a hill" To print output is 1-letter word(s)-1 2-letter words-1 3-letter words-1 4-letter words-4
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
What is auto keyword in c?
What are Macros? What are its advantages and disadvantages?
Determine the result of performing two successive block transfers into the same area of a frame buffer using the binary arith operations
Which one would you prefer - a macro or a function?
What is the difference between the = symbol and == symbol?
Explain what are its uses in c programming?
Is anything faster than c?