Computer Programming (C/C++ Programming)

1. A constructor is called whenever
A. a object is declared
B. an object is used
C. a class is declared
D. a class is used

2. Overload function in C++
A. a group function with the same name
B. all have the same number and type of arguments
C. functions with same name and same number and type of arguments
D. All of the above

3. Operator overloading is
A. making C++ operators works with objects
B. giving new meaning to existing C++ operators
C. making new C++ operator
D. both a & b above

4. A constructor is called whenever
A. a object is declared
B. an object is used
C. a class is declared
D. a class is used

5. A class having no name
A. is not allowed
B. can’t have a constructor
C. can’t have a destructor
D. can’t be passed as an argument

6. The differences between constructors and destructor are
A. constructors can take arguments but destructor can’t
B. constructors can be overloaded but destructors can’t be overloaded
C. both a & b
D. None of these

7. A destructor takes
A. one argument
B. two arguments
C. three arguments
D. Zero arguments

8. Constructors are used to
A. initialize the objects
B. construct the data members
C. both a & b
D. None of These

9. In C++ a function contained within a class is called
A. a member function
B. an operator
C. a class function
D. a method

10. The fields in a class of a C++ program are by default
A. protected
B. public
C. private
D. None of these

Answers
1 – A / 2 – A / 3 – D / 4 – A / 5 – C / 6 – C / 7 – D / 8 – A / 9 – A / 10 – C

Comments

  1. Great work. I am highly obliged that you are sharing such info with us. I would appreciate if you will post on daily basis and that too with good typical info which i didn't get from anywhere. I will be enrolling in http://www.wiziq.com/course/6314-learn-c-programming-language-low-priced-student-edition I really appreciate your work

    ReplyDelete
  2. Hello, sir i would like to ask that what is the scope of c programming, what all topics should be covered and it is kinda bothering me … and has anyone studied from this course http://www.wiziq.com/course/2118-learn-how-to-program-in-c-language of c programming language online ?? or tell me any other guidance...
    would really appreciate help… and Also i would like to thank for all the information you are providing on c programming.

    ReplyDelete

Post a Comment

Popular posts from this blog

Electrical Machines (Three Phase Transformers)

Thermodynamics (Compressible Flow)

Electrical Machines (Special Machines)