CPP

CPP

Stored Sequences has 5 Questions

What is meant by sequence point?

Represent the point of execution in the program
Represent the whole program
Represent the beginning of the program
None of the mentioned
When does the next sequence point start?

At the beginning
After a terminating semicolon
It is a beginning statement
None of the mentioned
What is the output of this program?
  1.     #include 
  2.     #include 
  3.     #include 
  4.     using namespace std;
  5.     bool IsOdd (int i) 
  6.     {
  7.         return (i % 2) == 1; 
  8.     }
  9.     int main () 
  10.     {
  11.         vector<int> myvector;
  12.         for (int i = 1; i < 10; ++i) myvector.push_back(i);
  13.         vector<int> :: iterator bound;
  14.         bound = partition (myvector.begin(), myvector.end(), IsOdd);
  15.         for (vector<int> :: iterator it = myvector.begin(); it != bound; ++it)
  16.             cout << ' ' << *it;
  17.         return 0;
  18.     }

1 3 5
1 3 9
1 9 3 7
1 9 3 7 5
What is the output of this program?
  1.     #include 
  2.     #include 
  3.     using namespace std;
  4.     int main ()
  5.     {
  6.         string mys;
  7.         char mya[20]= "Hello world";
  8.         mys = mya;
  9.         cout << mys << '\n';
  10.         return 0;
  11.     }

Hello world
Hello
Error
Runtime error
What do input and output objects support?

Terminated sequences
Extracted sequences
Null-terminated sequences
None of the mentioned