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 / jasmeet singh
when assigning value to z, x is used with a "post"
decrement. so the original value for the x i.e. 4 is taken
for the calculation and then the decrement is done.
so answer is
4,3,1
Is This Answer Correct ? | 3 Yes | 15 No |
Answer / sandhya
the answer is
4 3 1
because
we have already asigned vale to x&y in begning so directly it will print 4 for x & 3 for y it becomes 3-2=1
Is This Answer Correct ? | 3 Yes | 29 No |
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).
which typw of errors ? & how to solve it ?
How to reverse a linked list without using array & -1? Thank you.
Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }
how tally is useful?
Write down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL
what is syntax error?
Assume that the int variables i and j have been declared, and that n has been declared and initialized. Write code that causes a "triangle" of asterisks of size n to be output to the screen. Specifically, n lines should be printed out, the first consisting of a single asterisk, the second consisting of two asterisks, the third consistings of three, etc. The last line should consist of n asterisks. Thus, for example, if n has value 3, the output of your code should be * ** *** You should not output any space characters. Hint: Use a for loop nested inside another for loop.
To generate the series 1+3+5+7+... using C program
loop1: { x=i<n?(i++):0; printf("%d",i); exit(x); continue; } Error- misplaced continue. Doubt-1.will the exit(x) be executed for all values of x 2.will this statement go out of the program.
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,
what is meant by linking error? how can i solve it? if there is a linking error " unable to open file 'cos.obj'? then what should i do?