Archive Pages Design$type=blogging

MCQ of C++ with answer Set-2

1. The ……………. Operator is known as insertion operator. A) >> B) > C) << D) < 2. State True or False. i) A satic function c...


1. The ……………. Operator is known as insertion operator.
A) >>
B) >
C) <<
D) <

2. State True or False.
i) A satic function can have access to only other static members (functions or variables) declared in the same class.
ii) A static member function can be called using the class name (instead of its objects)
A) True, True
B) True, False
C) False, True
D) False, False

3. Which of the following condition is true for an object used as a function argument?
i) A copy of the entire objects is passed to the function.
ii) Only the address of the object is transferred to the function.
A) Only i
B) Only ii
C) Both i and ii
D) None of them


4. …………… enable us to hide, inside the object, both the data fields and the methods that act on that data.
A) Encapsulation
B) Polymorphism
C) Inheritance
D) Overloading

5. Which of the following is/ are the characteristics of friend function.
A) It is not in the scope of the class to which it has been declared as friend.
B) It can invoke like a normal function without the help of any object.
C) Usually, it has the objects as arguments.
D) All of the above.

6. The dereferencing operator ………….. is used to access a member when we use pointers to both the object and the member.
A) ->*
B) .*
C) Any of the above
D) None of the above

7. A ………………. Is a class whose instances themselves are classes.
A) Subclass
B) Abstract Class
C) Meta Class
D) Object Class

8. The dereferencing operator ……… is used when the object itself is used width in the member pointer.
A) ->*
B) .*
C) Any of the above
D) None of the above

9. A constructor that accepts no parameters is called the ……………….
A) Paramless constructor
B) No parameter constructor
C) Default constructor
D) Argumentless constructor

10. Automatic initialization of object is carried out using a special member function called …………
A) Friend
B) Casting
C) Reference Parameter
D) Constructor

11. Which of the following characteristics of constructor are true.
i) They should be declared in the public section.
ii) They are invoked automatically when the objects are created.
iii) They do not have return type and void also.
iv) We cannot refer their address.
v) Constructors cannot virtual.
A) Only i, ii, iii and v
B) Only ii, iii, iv, and v
C) Only i, iii, iv and v
D) All i, ii, iii, iv and v

12. A ……………. takes a reference to an object of the same class as itself as an argument.
A) Reference constructor
B) Copy Constructor
C) Self Constructor
D) None of the above

13. State True or False
i) A destructor never takes any argument nor does it return any value.
ii) It releases memory space for future use.
A) True, True
B) True, False
C) False, True
D) False, False

14. Which of the following operates cannot be overloaded?
i) Size of operator (sizeof)            ii) Scope resolution Operator
iii) Conditional operator (?:)        iv) Assignment Operator (=)
A) i, ii, iii only
B) ii, iii, iv only
C) i, iii, iv only
D) all i, ii, iii, iv

15. …………. Is the process of creating new classes, called derived classes from existing classes called base class.
A) Inheritance
B) Encapsulation
C) Polymorphism
D) Overloading

16. State True or False.
i) While overloading operators new operator can be overloaded.
ii) The binary operator such as +, -, * and must explicitly return a value.
A) True, True
B) True, False
C) False, True
D) False, False

17. ………… function writes a string of text to a window.
A) cputs ()
B) put ()
C) gets ()
D) tputs ()

18. Which of the following condition (s) should satisfy the casting operator.
i) It must be a class member.
ii) It must not satisfy a return type.
iii) It must have any arguments.
iv) All of the above.

19. Find the Hierarchy of Data Types.
i) Long double   ii) Double             iii) Float                                iv) Long                                v) Int         vi) Char
A) 1-2-3-4-5-6
B) 1-3-2-4-5-6
C) 1-2-3-5-4-6
D) 1-2-4-3-5-6

20. ………….. function sets the fill pattern and color.
A) floodfill ()
B) setcolor()
C) setfillstyle()
D) fillstyle ()

 Answers:
1.       C) <<
2.       B) True, False
3.       C) Both i and ii
4.       A) Encapsulation
5.       D) All of the above.
6.       A) ->*
7.       C) Meta Class
8.       B) .*
9.       C) Default constructor
10.   D) Constructor
11.   D) All i, ii, iii, iv and v
12.   B) Copy Constructor
13.   A) True, True
14.   A) i, ii, iii only
15.   A) Inheritance
16.   C) False, True
17.   A) cputs ()
18.   iv) All of the above.
19.   A) 1-2-3-4-5-6
20.   C) setfillstyle()


You might also view the following related posts
For other more posts: Click Here

تعليقات

الاسم

Artificial Intelligence(AI) Backlinking Basic IT Best List Blogging Tips C C# C++ Computer Architecture Computer Fundamental Computer Security Computer/IT Officer Exam CSS Data Mining and Warehousing Data Recovery Tools Data Structure Database Management System E-commerce E-government Internet & Web Designing IT Law IT Tips and Tricks IT Tutorials Java JavaScript Keyword Research Tools MIS Multiple Choice Question (MCQ) Networking Online Earning Online IT Jobs Operating System Oracle Forms and Reports Programming Guide Programming Language SEO Social Networking Sites Software Download Software Engineering System Analysis and Design Top List VB.Net
false
rtl
item
Max5: MCQ of C++ with answer Set-2
MCQ of C++ with answer Set-2
Max5
https://maxs27.blogspot.com/2012/12/mcq-of-c-with-answer-set-2.html
https://maxs27.blogspot.com/
http://maxs27.blogspot.com/
http://maxs27.blogspot.com/2012/12/mcq-of-c-with-answer-set-2.html
true
1760660989564394152
UTF-8
لم يتم العثور على اى مواضيع شاهد الكل اقرأ المزيد رد احذف الرد حذف بواسطة الرئيسية صفحات مواضيع شاهد الكل نوصى لك التسميات الارشيف بحث لم يتم العثور على ماتبحث عنه عودة للرئيسية الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر just now 1 دقيقة مضت $$1$$ دقيقة مضت 1 hour ago $$1$$ ساعة مضت الامس $$1$$ يوم مضى $$1$$ اسبوع مضى اكثر من 5 اسابيع مضت