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
Is c programming hard?
What are the types of type qualifiers in c?
How can I remove the leading spaces from a string?
What are structure types in C?
How many types of errors are there in c language? Explain
Give the rules for variable declaration?
What does c mean in basketball?
What is a newline escape sequence?
what is the structure pointer?
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
How do we open a binary file in Read/Write mode in C?
What is structure and union in c?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What is the best way to comment out a section of code that contains comments?
List some of the dynamic data structures in C?