WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("%d%d%d",x,y,z);
}

Answers were Sorted based on User's Feedback



WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / sampath alagappan

3,3,0

Is This Answer Correct ?    2 Yes 0 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / manikanta

x=3,y=3,z=1

Is This Answer Correct ?    1 Yes 1 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / arunkumar

it will be 3,3,1
no doubt it is the correcct one..
if anybody have a doubt compile and execute it with turbo c.

Is This Answer Correct ?    0 Yes 0 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / monika thakur

3,3,1

Is This Answer Correct ?    0 Yes 0 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / jasmeet singh

hey i typed the output of x=4 but its 3. coz after the
decrement now its value is 3.

Is This Answer Correct ?    4 Yes 5 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / ramya b.m

The output will be 3 3 1. initially the value of x is 4 and
subtracting it with value of y which is 3 the difference is
1. while printing the value of x is decremented by 1 and
hence the output 3 3 1.

Is This Answer Correct ?    1 Yes 2 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / venkat

The output will be 331
this is so because while assigning x -y is assinged to z..
so z=4-3=1
then the value of x will be decremented { post decrement }
now the value of x will be 4-1 = 3
so while printing
x = 3
y = 3{no change}
z= 1

Is This Answer Correct ?    1 Yes 2 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / tommy tom

331

x = 4-- = 3
y = 3
z = 1

then, when printing, there are no spaces in the "%d%d%d" format string, thus there are no spaces in the printing of the numbers. Also, at the end of the run, the command prompt will be tacked onto the end of the output, as the format string contains no newlines, line returns, or other reasons to assume a nice printing.

Is This Answer Correct ?    1 Yes 2 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / guru1985

#include<stdio.h>
#include<conio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("x=%d\ny=%d\nz=%d",x,y,z);
}
Output=>
x=3
y=3
z=1

Is This Answer Correct ?    0 Yes 3 No

WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf..

Answer / geetha.s.b

4,3,1

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C C++ Errors Interview Questions

void main() { int i=7; printf("N= %*d",i,i); }

6 Answers   HCL,


Write a C program to enter 10 integer numbers through one variable and count how many of them are even using while loop ?

2 Answers  


I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00

3 Answers   UCB,


write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;

0 Answers  


What are the different types of errors in C and when they occur?

4 Answers  






void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?

24 Answers   HCL,


full c programming error question based problem

3 Answers   HCL, TCS,


UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....

5 Answers  


main() { char c; for(c='A';c<='Z';c++) getch(); }

9 Answers  


WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf("%d%d%d",x,y,z); }

25 Answers   HCL,


To generate the series 1+3+5+7+... using C program

18 Answers  


Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;

3 Answers  


Categories