In the name of ALLAH, the Most Beneficent, the Most Merciful

CS201 Quiz 3 Fall 2024

CS201 Quiz 3 Fall 2024

 CS201 Quiz 3 Fall 2024






Here are all the MCQs with answers:

  1. Friend function declaration can go ___________________ the class

    • Answer: only outside
  2. In a class we can have ___________ constructor(s).

    • Answer: many
  3. Header files provide ______________ so the program running on one operating system can run without an error on the other system.

    • Answer: portability
  4. Windows operating system may itself take memory from ___________.

    • Answer: heap
  5. The members of a class declared with the keyword struct are _____________by default.

    • Answer: public
  6. The friend functions are _____________.

    • Answer: not member of a class
  7. If class A is a friend of class B, and class B is a friend of class C. If class A wants class C to be a friend, __________________

    • Answer: it has to declare, class B as a friend
  8. What will be the output of the following C++ code?

    #include<iostream.h>
    #define max 100
    main()
    {
        #ifdef max
        Cout<<”Hellow;
    }
    
    • Answer: Error
  9. Macros are categorized into _________ type(s).

    • Answer: two
  10. Destructor _______________________.

    • Answer: cannot be overloaded and have no return type
Post a Comment (0)
Previous Post Next Post
z
//1