Question 1
In C++, what is the purpose of the 'using namespace std;' directive?
The std namespace contains standard C++ library facilities; 'using namespace std;' eliminates the need to prefix std:: before cout or cin.
In C++, what is the purpose of the 'using namespace std;' directive?
The std namespace contains standard C++ library facilities; 'using namespace std;' eliminates the need to prefix std:: before cout or cin.
To perform standard input/output (I/O) stream operations such as cin and cout in modern C++, which header should be included?
The standard C++ header <iostream> declares stream objects and classes used for standard input/output, including std::cin and std::cout.
In C and C++, preprocessor directives begin with which symbol?
Preprocessor directives like #include and #define begin with # and are processed before actual compilation begins.
Keywords in C and C++ programming languages are also known as -
Keywords are reserved words that have predefined meanings in the compiler and cannot be used as identifier names.
What is the correct sequence of compilation stages for a C language program?
The C build pipeline expands macros/includes (Preprocessing), generates assembly (Compilation), creates object code (Assembly), and combines object files (Linking).