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

How can I find out how much free space is available on disk?

0 Answers  


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

0 Answers   HCL,


How can I delete a file?

0 Answers  


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

0 Answers  


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

0 Answers   MNC,






What is a newline escape sequence?

0 Answers  


wt is d full form of c

6 Answers   TCS, Wipro,


Can we replace the struct function in tree syntax with a union?

0 Answers   Huawei,


I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?

3 Answers  


f(x,y,z) { y = y+1; z = z+x; } main() { int a,b; a = 2 b = 2; f(a+b,a,a); print a; } what is the value of 'a' printed

5 Answers  


What are different storage class specifiers in c?

0 Answers  


give an example of type casting by a simple c program

2 Answers   TCS,


Categories