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 |
What is stl stack?
What is a stl vector?
How the STL's are implemented, What the difference between templates and STL?
What are the symptoms of stl?
What two types of containers does the stl provide?
What is meant by stl in c++?
write a program that input four digit number and find how many 7 that number contains
Is there any error below, its a code to delete all entires from a map #include <map> #include iostream.h int main() { int i =0; map <int, char> TestMap; while(i<3) { TesMap.insert(TestMap::value_type(i,Test)); i++; } typedef map<int, char> :: iterator mapIter =TestMap.begin(); if(mapIter!=TestMap.end()) { TestMap.erase(mapItrer); ++mapIter; } return 0; }
5. Write c++ function that would intake a string and return the number of occurrences of a given character in that sring Ex:- if the word is “Colombo” and count the occurrences of the letter “o” the function would return 3
what is use of for loop?
I am doing my BS.c MATHS CAN I ABLE TO JOIN IN NIIT?
Explain how to insert a hyperlink in to an Excel worksheet and save a Word document as a Web page.