What will be the output of
x++ + ++x?
Answer Posted / prem
if x=3
y=x++ + ++x;
y will be 8
x will be 5
calculating y part
1) x++ is 3 and x will be 4
2)++x is 5 bcz x is incremented then assigned so x=5
so y finally gives 8.
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is the difference between typedef and #define?
What are the types of functions in c?
write a program in c language to print your bio-data on the screen by using functions.
Can you apply link and association interchangeably?
What is the benefit of using #define to declare a constant?
How can I read a binary data file properly?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
How do I swap bytes?
What are directives in c?
What is operator promotion?
How can I read and write comma-delimited text?
Explain how can I convert a number to a string?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
Differentiate between the = symbol and == symbol?