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 |
Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?
HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER
State the difference between x3 and x[3].
what will happen if you free a pointer twice after allocating memory dynamically ?
How to add two numbers with using function?
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
What's the difference between constant char *p and char * constant p?
explain what is a newline escape sequence?
What is indirection? How many levels of pointers can you have?
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);
How do you prevent buffer overflows in C?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?