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);
}
Answers were Sorted based on User's Feedback
Answer / poorna
Ans:3 3 1
bcoz
z=4-- -3; z=4-3;
z=1;
and x=3
there fore answer is 3 3 1
| Is This Answer Correct ? | 42 Yes | 5 No |
Answer / 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 |
What are the different types of C instructions?
why array index always starts from zero??
What are the types of assignment statements?
how can be easily placed in TCS.
program for reversing a selected line word by word when multiple lines are given without using strrev
How can I swap two values without using a temporary?
Which is better pointer or array?
Explain how do you print only part of a string?
What is the collection of communication lines and routers called?
Array is an lvalue or not?
How will you find a duplicate number in a array without negating the nos ?
no consistent academics. how to answer the question