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 are the storage classes in C?
What's a good way to check for "close enough" floating-point equality?
What is a lookup table in c?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What is const and volatile in c?
What is the hardest programming language?
what is the role you expect in software industry?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What is the explanation for the dangling pointer in c?
Explain how can I prevent another program from modifying part of a file that I am modifying?
Is null always equal to 0(zero)?
Explain what does a function declared as pascal do differently?
What are the __date__ and __time__ preprocessor commands?
Explain main function in c?
What is the difference between printf and scanf in c?