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
Who developed c language?
How many levels of indirection in pointers can you have in a single declaration?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is self-referential structure in c programming?
What is a substring in c?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What are linker error?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What is page thrashing?
Tell me is null always defined as 0(zero)?
code for quick sort?
Why & is used in c?
What is array of structure in c programming?
What is the size of a union variable?
any "C" function by default returns an a) int value b) float value c) char value d) a & b