Which of the following is the correct syntax to add the header file in the C++ program? *
#include "iostream.h"
<include> "iostream.h"
#include<iostream.h>
All of these
Answers
Answered by
3
Answer:
Explanation: C++ uses double quotes to include a user-defined header file. The correct syntax of including user-defined is #include “userdefinedname”.
Answered by
0
#include "iostream.h" and #include<iostream.h> is the correct syntax to add the header file in the C++ program. Option(a) and (c) both are correct.
- #include is used to add a standard or user-defined file in the program and it is written at the starting of the program.
- Include using "" can be used to access the current directory where the source “file_name” is located.
- Include using <> can be used to import files with a predetermined directory path. It is usually used to access files placed in the standard system directories.
Similar questions