Questions and Answers
- 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;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In this program,we need to string header file to run this program.
Compilation ErrorIn function 'int main()':
7:18: error: 'gets' was not declared in this scope
- What does a default header file contain?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In the header file, we define something that to be manipulated in the program.
- Identify the incorrect statement.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The iostream.h is used in the older versions of c++ and iostream is evolved from it in the std namespace.
- Which of the following keyword is used to declare the header file?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The include keyword is used to include all the required things to execute the given code in the program.
- What is the user-defined header file extension in c++?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
h