c++ programming test

Consider the following code:

#include
using namespace std;

int main()
{
cout << "The value of __LINE__ is " <<__line__;>

What will be the result when the above code is compiled and executed?

Correct answer is:
c. The code will compile and run without errors

If input and output operations have to be performed on a file, an object of the _______ class should be created.

a. fstream

b. iostream

c. ostream

d. istream

e. None

Correct answer is:
a. fstream

0 commentaires:

Enregistrer un commentaire