main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output??
Answers were Sorted based on User's Feedback
Answer / sateesndaruh varma ba
x=x++ it means the x value is first assignto x and then increment by 1
so here in this given value of x=10
it become" x= 11" in output
y=++y it means pre increment so first y value is incremented and than it will assignto y
finally y=16
| Is This Answer Correct ? | 2 Yes | 5 No |
Answer / ankit
11 16 is correct ..
value of x is incremented and is saved in memeory and at
the time of display it will be 11,
as in case of y it will be incremented and will store the
incremented value to be displayed for y.
| Is This Answer Correct ? | 0 Yes | 3 No |
How to write a program for swapping two strings without using 3rd variable and without using string functions.
Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;
what is the use of call back function in c?tell me with example
Is sizeof a keyword in c?
what is the function of .h in #include<stdio.h> in c ?
23 Answers HCL, IBM, Wipro,
Tell me what are bitwise shift operators?
What are the application of c?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
write a program in C to swap two variables
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
int main() { int days; printf("enter days you are late"); scanf("%d",days); if (days<=5) printf("5o paisa fine"); if (days<=10&&days>=6) printf("1rs fine"); if(days>10) printf("10 rs fine"); if(days=30) printf("membership cancelled"); return 0; } tell me whats wrong in this program? is it right?
How does free() know explain how much memory to release?