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 sizeof array in c?
Why we use int main and void main?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
What library is sizeof in c?
What do you mean by Recursion Function?
What is I ++ in c programming?
What are the different types of constants?
What are the 3 types of structures?
int i=10; printf("%d %d %d", i, i=20, i);
Give the rules for variable declaration?
What is the difference between int main and void main?
Write a program to check palindrome number in c programming?
What is the size of structure in c?
Explain what is operator promotion?
a value that does not change during program execution a) variabe b) argument c) parameter d) none