what is strcture
i++ i ++i answer to this i=5 what is the out put
Answers were Sorted based on User's Feedback
My answer is
1.
#include<iostream>
using namespace std;
int main()
{
int i = 5;
cout << ++i << i << i++ << endl;
return 0;
}
ANS:765
2.
#include<iostream>
using namespace std;
int main()
{
int i = 5;
cout << ++i ;
cout << i ;
cout << i++ << endl;
return 0;
}
ANS:666
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / shivendra
The o/p will be as follows:-
666
reason:- in c++ in cascading the processing will be from
RHS. hence first "++i" will be executed and gives value 6.
after that "i" is executed as 6 and finally "i++" which will
also give 6.
one thing to notice here is that printing will be as usual
i.e. from left to right. So if the structure was "++i i i++"
then o/p will be 765
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / osama
The answer is undefined since you are modifying a built in
type in sequence without a sequence point in between.
| Is This Answer Correct ? | 0 Yes | 1 No |
Waht is inheritance
How does an stl file work?
What is stl in oop?
How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.
write a program that will accept a number and print.its equivalent in words the maximum input number is 9999
write a program to demonstrate,how constructor and deconstructor work under multilevel inheritance
what is a template?
2 Answers Amazon, BITS, IBS, Wipro,
Is stl part of c++ standard?
why does the execution of a c++ program start with main()???
What is the name of your birth place?
In what cases using of a 'template' is a better approach then using of a 'base class'?
6 Answers Lucent, Mind Tree, Wipro,
Difference between Structure and Class in C++?