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

output??

Answer Posted / mazrul

in x=x++;
the above expression is postfix
first we assign 10 into x then increment it by one so value
of x become 11
ic case of
y=++y;
is prefix expression firstly we increment value of y
then assign it to y.
so y become
y=16

Is This Answer Correct ?    53 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

801


Difference between Shallow copy and Deep copy?

1658


What does dm mean sexually?

931


What is a scope resolution operator in c?

844


How do you convert strings to numbers in C?

815






Write a program to reverse a given number in c language?

723


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1222


What is selection sort in c?

702


what is the difference between 123 and 0123 in c?

827


What are the advantages of union?

718


What is pass by value in c?

684


Can we replace the struct function in tree syntax with a union?

890


State the difference between x3 and x[3].

737


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

1567


What is ctrl c called?

682