Operators
- What is the output of this program?
#include <iostream>
using namespace std;
int main()
{
double P = 12.93099;
float Q = 11.120;
int R ;
R = (int) P;
cout << R <<" ";
R = (int) Q;
cout << R ;
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In this program, we casted the data type to integer.
- How are types therein user-defined conversion?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
There are two types of user-defined conversions. They are conversion by the constructor, Conversion functions.
- Pick out the correct syntax of operator conversion.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
operator float()const
- How to stop your program from eating so much ram?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
*Use the hard drive, instead of RAM.
*Declare it in program memory, instead of on the stack.
*Find a way to work with the data one at a time.
- What are the essential operators in c++?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
+, |, and <= all are the essential operators in c++.