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 / sambath

3,3,1

Is This Answer Correct ?    75 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 / shreyas

the answer is 3 3 1..........

while computing value of z ....x will be 4 .....but while
printing its value it has been decremented by 1 and hence x=3.

Is This Answer Correct ?    42 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 / yaswanthraj

Absolutely.. 3 3 1

No doubt in it.....all frnds who said it are right and their
explaination is also correct......

while Z is calculated X is 4...since it is post decrement....

Is This Answer Correct ?    12 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 / amrita mohanty

3,3,1
since it is a post increment operation,so x--=4 initially.
but after that the value of x becomes 3.
x-- - y = 4-3=1
therefore x=3,y=3,z=1

Is This Answer Correct ?    9 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 / viru

3 3 1

Is This Answer Correct ?    5 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 / anjana priyadharshini

THE OUTPUT IS: 3,3,1
THE PEOPLE WHO TOLD THIS ANSWER THEIR EXPLANATION IS CORRECT

Is This Answer Correct ?    5 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 / dinesh

3,3,1

Is This Answer Correct ?    4 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 / medo

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

Is This Answer Correct ?    3 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 / arpit singhal

3,3,1

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 / vishnu

initally x=4,y=3
z=x-- -y;
after doing x-y operation and that value wil be assigned to
z.there followed by x value wil be decreased by 1.
hence z=4-3 z=1
x=4-1 x=3
y=3
hence output will be
3,3,1

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C C++ Errors Interview Questions

what is the large sustained error signal that eventually cause the controller output to drive to its limit

1 Answers   TCS,


Write a c-programe that input one number of four digits and find digits sum?

2 Answers  


char* f() return "hello:"; void main() {char *str=f(); }

1 Answers  


what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?

2 Answers   TCS,


Answering Yes or No in C++...using only stdio.h and conio.h..........help me please...? here's must be the output of the program: Screen A Exam No. items Score 1 20 20 2 35 35 Another Entry? [Y] or [N] : Screen B: Record No. Student's Name: 1 Fernando Torres 2 Chuck Norris Note: if you press Y, the program must repeat the procedure in screen A, then if N, the program must proceed to the screen B....Please Help me out............

1 Answers  






2. A student studying Information Technology at Polytechnic of Namibia is examined by coursework and written examination. Both components of assessment carry a maximum of 50 marks. The following rules are used by examiners in order to pass or fail students. a. A student must score a total of 40% or more in order to pass (total = coursework marks + examination marks) b. A total mark of 39% is moderated to 40% c. Each component must be passed with a minimum mark of 20/50. If a student scores a total of 40% or more but does not achieve the minimum mark in either component he/she is given a technical fail of 39% (this mark is not moderated to 40%) d. Grades are awarded on marks that fall into the following categories. Mark 100-70 69-60 59-50 49-40 39-0 Grade A B C D E Write a program to input the marks for both components (coursework marks out of 50 and examination marks out of 50), out put the final mark and grade after any moderation. [30]

0 Answers  


wap for bubble sort

3 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,


Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has already been declared, use a do...while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .

2 Answers  


I'm having trouble with coming up with the correct code. Thank You!! The assignment was to write a program using string functions that accepts a price of an item and displays its coded value. The base of the keys: X C O M P U T E R S 0 1 2 3 4 5 6 7 8 9 Sample I/O Dialogue: Enter Price: 489.50 Coded Value: PRS.UX

0 Answers  


void main() { int i=5; printf("%d",i+++++i); }

14 Answers   HCL,


full c programming error question based problem

3 Answers   HCL, TCS,


Categories