-
What is the output of this program?
#include
using namespace std;
int main()
{
char ch[30];
cout << "Enter Name: ";
gets(ch);
cout << "Name: ";
puts(ch);
return 0;
}
-
- Runtime Error
- Garbage value
- Exception occur
- Compilation Error
- None of these
Correct Option: D
In this program,we need to string header file to run this program.
Compilation Error
In function 'int main()':
7:18: error: 'gets' was not declared in this scope