C++ Programming Test

    Welcome to your C++ Programming Test

    1. To hide a data member from the program, you must declare the data member in the _______ section of the class.
    2. What is the Output of this Program? #include using namespace std; class sample { private: int a, b; public: void test() { a = 100; b = 200; } friend int compute(sample e1); }; int compute(sample e1) { return int(e1.a + e1.b) - 5; } int main() { sample e; e.test(); cout<<compute(e); return 0; }
    3. The function whose prototype is void getData(Item *thing); receives ________ .
    4. Null character needs a space of _______ .
    5. The number of structures that can be declared in a single statement is _______ ?
    6. Which of the following formulas can be used to generate random integers between 1 and 10?
    7. Format flags may be combined using the _______.
    8. Which of the following will store the number 320000 as a Float number?
    9. Which other keywords are also used to declare the class other than class?
    10. The following statement where T is true and F is false,T && T || F && T _______ .
    11. Which of the following statements declare a variable that can contain a decimal number?
    12. The statement int num[2][3]={ {1,2}, {3,4}, {5, 6} }; ________ .
    13. The standard input stream, which refers to the keyboard, is called _______?
    14. Elements in an array are identified by a unique _______ .
    15. The statement fwrite( (char*)&objl, sizeof(objl) ); ________ .