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

what is mean by Garbage collection ? Please answer me. Advance thanks.

4 Answers   Excel,


Why do we need a structure?

0 Answers  


How to implement a packet in C

0 Answers   Aricent,


can we execute the program with the object file

1 Answers  


There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables.

15 Answers   Cisco, Google, MBT,






Distinguish between actual and formal arguments.

0 Answers  


what are the 10 different models of writing an addition program in C language?

0 Answers  


What is the time and space complexities of merge sort and when is it preferred over quick sort?

0 Answers   Amazon,


write a program to swap Two numbers without using temp variable.

75 Answers   EMC, Focus, GreyB, HCL, Hitech, HP, Huawei, Infosys, Mannar Company, Microsoft, Miles Software, Odessa Technologies, Satyam, TCS, Wipro,


What does the function toupper() do?

0 Answers  


Write a C program to print 1 2 3 ... 100 without using loops?

15 Answers   Hindalco,


What is 1d array in c?

0 Answers  


Categories