Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is strcture

i++ i ++i answer to this i=5 what is the out put

Answers were Sorted based on User's Feedback



what is strcture i++ i ++i answer to this i=5 what is the out put..

Answer / bala

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

what is strcture i++ i ++i answer to this i=5 what is the out put..

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

what is strcture i++ i ++i answer to this i=5 what is the out put..

Answer / subbu

566

Is This Answer Correct ?    1 Yes 1 No

what is strcture i++ i ++i answer to this i=5 what is the out put..

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 strcture i++ i ++i answer to this i=5 what is the out put..

Answer / diliprajug

my answer is 755........

Is This Answer Correct ?    0 Yes 1 No

what is strcture i++ i ++i answer to this i=5 what is the out put..

Answer / antony

The output is 7

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More STL Interview Questions

Explain when u will use Observer pattern and how u will implement in c++ .

1 Answers  


How stl is different from the c++ standard library?

0 Answers  


Write a program in C/C++ to implement reader- writer problem

1 Answers   Wipro,


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

0 Answers  


What is the name of your birth place?

0 Answers  


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

0 Answers   Appin, NIIT,


What is 2*2?

7 Answers  


what is template and type convertion

0 Answers   TATA,


Explain References in C++

3 Answers  


What does stl stand for in basketball?

0 Answers  


if x<>=z then statement end what is the cyclomatic complexity

5 Answers  


what is c++

2 Answers  


Categories