What will be the output of
x++ + ++x?
Answer Posted / shashi shekhar
In this type of question the operation done from right side of the expression.Here we can see two types of increments pre and post increment,in post first the value assigned then increment but in pre first the value is incressed then the value assigned.
For example if x is initialized with a value
"1" then the this expression gives the output "4".
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Why is main function so important?
Why do we write return 0 in c?
What is header file in c?
How do you use a 'Local Block'?
What is the equivalent code of the following statement in WHILE LOOP format?
How do you determine a file’s attributes?
What is the heap in c?
How to define structures? ·
What is the usage of the pointer in c?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
What is static volatile in c?
How many levels of pointers have?
Explain how can you check to see whether a symbol is defined?
What is the best way of making my program efficient?
How can I swap two values without using a temporary?