Podcast
Questions and Answers
Which of the following is a correct way to include the standard input/output library in a C++ program?
Which of the following is a correct way to include the standard input/output library in a C++ program?
- #include (correct)
- #include
- #include
- #include
What is the purpose of the 'using namespace std;' statement in a C++ program?
What is the purpose of the 'using namespace std;' statement in a C++ program?
- It imports all namespaces from the standard library into the program.
- It restricts the usage of standard library functions to the std namespace only.
- It is not a valid statement in C++.
- It allows the program to use elements of the standard C++ library without specifying the std namespace. (correct)
What is the significance of the 'int main()' function in a C++ program?
What is the significance of the 'int main()' function in a C++ program?
- It is optional and can be omitted from a C++ program.
- It is used to declare an integer variable named 'main'.
- It is the entry point of the program where execution begins. (correct)
- It is a predefined function in the C++ standard library.