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



what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

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

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / vignesh1988i

SORRY YHE OUTPUT WILL BE 3 3 1

Is This Answer Correct ?    20 Yes 4 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / aa

3 3 1

Is This Answer Correct ?    12 Yes 2 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

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 is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / yogesh bansal

yes, correct answer is 3 3 1

Is This Answer Correct ?    9 Yes 1 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / amit

331

Is This Answer Correct ?    3 Yes 0 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / vinay.k

yes answer is 3 3 1.

Is This Answer Correct ?    2 Yes 0 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / kartik

hi friends upto me....

X=4
Y=3
Z=0

Is This Answer Correct ?    1 Yes 0 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / sudarshan

4 3 1

Is This Answer Correct ?    0 Yes 1 No

what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,..

Answer / guest

431

Is This Answer Correct ?    13 Yes 15 No

Post New Answer

More C Interview Questions

write a program for size of a data type without using sizeof() operator?

22 Answers   HCL, IBM,


Is c object oriented?

0 Answers  


which one is better structure or union?(other than the space occupied )

2 Answers  


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

0 Answers   Wilco,


What is the difference between declaring a variable by constant keyword and #define ing that variable?

1 Answers  






Dont ansi function prototypes render lint obsolete?

0 Answers  


Why we use break in c?

0 Answers  


Write a code to determine the total number of stops an elevator would take to serve N number of people.

0 Answers   Expedia,


main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }

2 Answers  


what defference between c and c++ ?

6 Answers  


How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?

2 Answers  


what is the return type of printf

3 Answers  


Categories