What will be the output of
x++ + ++x?
Answer Posted / naveenkumari
here we can see two types of increments pre and post
increment . since x++ is post increment first the value is
assigned and then increments but in case of ++x first the
value is incremented and then assigned since x is not
initialized with any value the above expression gives a
garbage value .For example if x is initialized with a value
"1" then the this expression gives the output as "3"
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What does sizeof function do?
what is the diffrenet bettwen HTTP and internet protocol
What is wild pointer in c?
provide an example of the Group by clause, when would you use this clause
What is a program flowchart and explain how does it help in writing a program?
What is structure and union in c?
What tq means in chat?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What is struct node in c?
Write a program to know whether the input number is an armstrong number.
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
What is header file in c?
What are the features of the c language?
How can you increase the size of a statically allocated array?
what do you mean by enumeration constant?