Will the program run successfully?

Main()
{
int a=2.9;
float b=9;
cin>>"%d %f">>a>>b;
return();
}

Questions by vishwanathpillay   answers by vishwanathpillay

Showing Answers 1 - 9 of 9 Answers

This will generate compiler errors and a warning.

A warning on line

int a = 2.9; // should use a typecast to convert to int

and a compiler error on line

cin>>"%d%f" >> a >> b; //cin does not take a right hand operand of const char

  Was this answer useful?  Yes

This will generate compiler errors and a warning.

A warning in line

int a = 2.9; //should use a typecast to convert to int

and a compiler error in line

cin >> "%d %f" >> a >> b; // cin does not take a right hand operand of const char

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions