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

difference between Low, Middle, High Level languages in c ?

0 Answers   Bosch, Infosys,


why r u join this company? give solid resons.

16 Answers   IBM, Infosys, TCS,


What is the code for 3 questions and answer check in VisualBasic.Net?

0 Answers   Infosys,


What are the properties of union in c?

0 Answers  


What is context in c?

0 Answers  






what would be the output of the follwing struct st { char name[20]; int i; float f; }; main() { struct st emp = {"forum"}; printf("%d %f",emp.i,emp.f); }

4 Answers  


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

0 Answers  


What is formal argument?

0 Answers  


In c programming language, how many parameters can be passed to a function ?

0 Answers  


Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.

3 Answers   HCL,


Can math operations be performed on a void pointer?

0 Answers  


Explain how do you declare an array that will hold more than 64kb of data?

0 Answers  


Categories