-
What is the output of this program?
#include
#include
using namespace std;
string askMessage(string Message = "Please enter a message: ");
int main()
{
string Input = askMessage();
cout << "Here is your message: " << Input;
return 0;
}
string askMessage(string Message)
{
string Input;
cout << Message;
cin >> Input;
return Input;
}
-
- Compilation Error
- Runtime Error
- Garbage value
- The message you entered
- None of these
Correct Option: D
In this program, we are getting a number and printing it.