101. Destructors are called ?
- a) Not defined
- b) In any order
- c) In the reverse order of constructor calls
- d) In the same order of constructor calls
Answer: C - Destructors execute in reverse order of constructors (LIFO - Last In, First Out).
102. Which of the following is a valid scope in VBScript?
- a) Dim
- b) Public
- c) Private
- d) All of the above.
Answer: D - VBScript supports Dim, Public, and Private scopes for variable declaration.
103. How can we define a member function outside the class ?
- a) Using union.
- b) Using structure.
- c) Using pointers.
- d) Using scope resolution.
Answer: D - Scope resolution operator (::) defines class methods outside the class body in C++.
104. Seek time is________
- a) Time taken to retrieve a data.
- b) Time taken by read/write head mechanism to position itself over appropriate cylinder.
- c) Time taken by appropriate sector to come under read/write.
- d) None of the above.
Answer: D - Seek time is actually time for read/write head to move to correct track, not positioning over cylinder.
105. The sign && means________
- a) Logical OR
- b) Bitwise OR
- c) Logical AND
- d) Bitwise AND
Answer: C - && is the logical AND operator that returns true only if both operands are true.
106. Classes that can be used to instantiate objects are called concrete classes.________
- a) TRUE
- b) FALSE
- c) N.A.
- d) N.A.
Answer: A - Concrete classes can be instantiated, unlike abstract classes which cannot.
107. How will you get the octal value of the given number in VBScript?
- a) Using Oct function
- b) Using Hex function
- c) Using Rnd function
- d) Using Sqr function
Answer: A - Oct() function converts decimal numbers to their octal string representation.
108. Which of the following function prototypes is perfectly acceptable?
- a) Int Function(int Tmp = Show());
- b) Float Function(int Tmp = Show(int, float));
- c) Both A and B.
- d) Float = Show(int, float) Function(Tmp);
Answer: A - Only option A shows valid C++ default parameter syntax with function call as default.
109. The process of deriving a class from another derived class is known as ?
- a) Single inheritance
- b) Dual inheritance
- c) Multiple inheritance
- d) Multilevel inheritance
Answer: C - This describes multiple inheritance (though question seems to describe multilevel inheritance).
110. A GUI:________
- a) Uses buttons, menus, and icons.
- b) Should be easy for a user to manipulate.
- c) Stands for Graphic Use Interaction.
- d) Both a and b.
Answer: D - GUI stands for Graphical User Interface and should be user-friendly with visual elements.
111. What is the purpose of an abstract class ?
- a) To provide help with database connectivity.
- b) To provide data input to other classes.
- c) To provide security to other classes.
- d) To provide an appropriate base class from which other classes can inherit.
Answer: D - Abstract classes define interfaces for derived classes but cannot be instantiated themselves.
112. What is a class in c++ ?
- a) When you define a class, you define a blueprint for a data type.
- b) When you define a class, you make get more functionality.
- c) When you define a class, you define the logic.
- d) When you define a class, you make debugging.
Answer: A - Classes are blueprints/templates for creating objects with defined properties and methods.
113. The conversion from basic data to class type can be done by ________
- a) Writing constructor
- b) Is not possible
- c) Overloaded casting operator
- d) Object of a class
Answer: A - Constructors can perform type conversions from basic types to class types in C++.
114. What is data hiding ?
- a) It is related with hiding internal object details.
- b) It is related with showing internal object details.
- c) It is related with datatypes.
- d) None of above.
Answer: A - Data hiding (encapsulation) protects internal object data from external access.
115. How to find out the index of a particular character or a string?
- a) Position()
- b) Index()
- c) IndexOf()
- d) None of the mentioned
Answer: C - indexOf() method returns the position of the first occurrence of a substring.
116. Which of the following is not a JavaScript datatype?
- a) Boolean
- b) String
- c) Number
- d) Function
Answer: D - Function is a callable object type, not a primitive data type in JavaScript.
117. Which is not a feature of a GUI that makes learning a program easy for users?
- a) Online help
- b) WYSIWYG formatting
- c) Dialog boxes
- d) Detailed key strokes and commands
Answer: D - Complex keyboard commands make programs harder to learn, not easier.
118. The syntax of Eval is ______
- a) [objectName.]eval(numeriC.
- b) [objectName.]eval(string)
- c) [EvalName.]eval(string)
- d) [EvalName.]eval(numeriC.
Answer: B - eval() executes JavaScript code represented as a string parameter.
119. ______ attribute is used to specify the character encoding used in an external script file.
- a) Type
- b) Character
- c) Character
- d) Charset
Answer: D - The charset attribute defines character encoding for external script files in HTML.
120. What is the output of this expression? x = 2 + "2"; document.write(x);
- a) 22
- b) 4
- c) 2
- d) syntax error
Answer: A - JavaScript performs string concatenation when adding number to string, resulting in "22".