CPP

CPP

Input Stream has 6 Questions

What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     int main ()
  4.     {
  5.         int i;
  6.         cout << "Please enter an integer value: ";
  7.         cin >> i + 4;
  8.         return 0;
  9.     }

73
your value + 4
Error
None of the mentioned
What is the output of this program?
  1.     #include 
  2.     #include 
  3.     #include 
  4.     #include 
  5.     using namespace std;
  6.     template <typename CharT>
  7.     void ignore_line ( basic_istream<CharT>& in )
  8.     {
  9.         in.ignore ( numeric_limits<streamsize> :: max(), in.widen ( '\n' ) );
  10.     }
  11.     int main()
  12.     {
  13.         cout << "First input: ";
  14.         cin.get();
  15.         cout << "Clearing cin.\n";
  16.         cin.clear();
  17.         ignore_line ( cin );
  18.         cout << "All done.\n";
  19.     }

First input
Clearing cin
Error
None of the mentioned
How many parameters are there in getline function?

1
2
2 or 3
3
What can be used to input a string with blankspace?

inline
getline
putline
None of the mentioned
When will the cin can start proceessing of input?

After pressing return key
BY pressing blankspace
Both a & b
None of the mentioned
What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     int main( )
  4.     {
  5.         char line[100];
  6.         cin.getline( line, 100, 't' );
  7.         cout << line;
  8.         return 0;
  9.     }

100
t
It will print what we enter till character t is encountered in the input data
None of the mentioned