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
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 |
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 |
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 |
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 |
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 |
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 |
I can not get my C++ program to work right. It is supposed to tell if a word is a palindrome or not, but it only tells thet the word is not a palindrome. And I can't fix it.
what is syntax error?
Write a C program to enter 10 integer numbers through one variable and count how many of them are even using while loop ?
What is the out put of this programme? int a,b,c,d; printf("Enter Number!\n"); scanf("%d",&a); while(a=!0) { printf("Enter numbers/n"); scanf("%d%d%d",&b,&c,&d); a=a*b*c*d; } printf("thanks!"); getche(); Entering numbers are a=1,b=2,c=3,d=4 b=3,c=4,d=-5 b=3,c=4,d=0
What is probability to guarantee that the task a programmer is going to create will be created and be able to run on a particular system (RTOS/GPOS).
what is the large sustained error signal that eventually cause the controller output to drive to its limit
How to upgrade LOOP environment, I just mean, how can i make loop statement editable ? I just try some program using loop statement and checking it in multiple compilers. Every compiler showing different output, what's the wrong ? is it a compiler based problem, or loop based problem, tell me why ? and what will be the debugging process, for this kind of problem ?
how tally is useful?
Display this kind of output on screen. 1 0 1 1 0 1 3. Display this kind of output on screen. 1 1 0 1 0 1 4. Display this kind of output on screen. 1 1 0 1 0 1 5.Display this kind of output on screen. 1 2 3 4 5 6 7 8 9 10
How to create a program that lists the capital country when told what the original country is? (Terribly sorry, I'm a novice programmer and would appreciate any help ;). Cheers, Alexxis
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
A sample program using data structure? what is file handling?