CSE MCQs :: C++ - MCQs
- Where does a cin stops it extraction of data?
-
What is the output of this program?
#include < iostream >
using namespace std;
int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >> i + 4;
return 0;
}
-
What is the output of this program?
#include < iostream >
using namespace std;
int main( )
{
char line[100];
cin.getline( line, 100, 't' );
cout << line;
return 0
}
- What can be used to input a string with blankspace?
- When will the cin can start proceessing of input?
- Pick out the correct objects about the instantiation of output stream.
- What is meant by ofstream in c++?
-
What is the output of this program?
#include < iostream >
using namespace std;
int main ()
{
char str[] = "Steve jobs";
int val = 65;
char ch = 'A';
cout.width (5);
cout << right;
cout << val << endl;
return 0;
}