write the value of x and y after execution of the statements:
int x=19,y;
y=x++ + ++x;
x++;
y++;
Answer / Padam Rani
int x=19,y; y=x++ + ++x; x++; y++;nAfter executing these statements, the variable x will have a value of 21, and variable y will have a value of 41. The reason is as follows: first, y is assigned the value of x++ which increments x to 20. Then, ++x is used which also increments x to 21. This new value (21) is added to the initial value of x (19), resulting in 40. y is then incremented again, making its final value 41.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the large sustained error signal that eventually cause the controller output to drive to its limit
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
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.
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
UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....
How to develop a program using C language to convert 8-bit binary values to decimals. TQ
Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0. Instructor's notes: This problem requires either a while or a do-while loop.
Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;
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............
what is exceptions?
what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,