Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



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



main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / madhu

hey how come 15 ....
ans is 11,16

Is This Answer Correct ?    5 Yes 7 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

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

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / daya

11 16

Is This Answer Correct ?    2 Yes 5 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

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

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / sheikh rasel

11

15

Is This Answer Correct ?    2 Yes 10 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / nirmala

11,15

Is This Answer Correct ?    3 Yes 19 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / rasel

11 15

Is This Answer Correct ?    0 Yes 16 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / kalai

10,15

Is This Answer Correct ?    1 Yes 22 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / mannucse

35 39

Is This Answer Correct ?    6 Yes 48 No

Post New Answer

More C Interview Questions

How to write a program for swapping two strings without using 3rd variable and without using string functions.

7 Answers   iGate, Infotech,


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++;

5 Answers   ITCO, Wipro,


what is the use of call back function in c?tell me with example

2 Answers   Bosch,


Is sizeof a keyword in c?

0 Answers  


what is the function of .h in #include<stdio.h> in c ?

23 Answers   HCL, IBM, Wipro,


Tell me what are bitwise shift operators?

0 Answers  


What are the application of c?

0 Answers  


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


write a program in C to swap two variables

7 Answers   Attrabyte, Marlabs,


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

0 Answers   Huawei,


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?

2 Answers  


How does free() know explain how much memory to release?

0 Answers  


Categories