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
- Identify the correct statement.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
By using typedef, we can create a type of pre-existing type only not our own type of data.
- Which keyword is used to define the user defined data types?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
typedef
- Which of the following header files is required for creating and reading data files?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In this fstream.h header file is used for accessing the files only.
- What does the data type defined by union will do?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Union is used to define the data types of our choice and it will store the data type in one location make them accessible.