what is the output of the following program?
#include<stdio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("\n%d %d %d",x,y,z);
}
Answer Posted / ravi chandra
x=4
y=3
z=x-- -y;
x-- means at first the left hand value will be equal to x
i.e., z=x and then the value of x gets decrement..
z=x-- -y
z=4-- -3
z=4-3 and x=x-1
z=1 and x=3
the y value remains same y=3
therefore x=3 y=3 and z=1
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the difference between #include
how to print the character with maximum occurence and print that number of occurence too in a string given ?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Can you think of a logic behind the game minesweeper.
List some of the static data structures in C?
Differentiate between null and void pointers.
Is file a keyword in c?
Explain what are its uses in c programming?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
How reliable are floating-point comparisons?
What is difference between function overloading and operator overloading?
What math functions are available for integers? For floating point?
Why main function is special give two reasons?
Explain the use of #pragma exit?
Difference between MAC vs. IP Addressing