142. Dividing a program into functions_____
- a) is the key to object oriented programming
- b) makes the program easier to conceptualize
- c) makes the program run faster
- d) both (B) and (C)
Answer: B - Function decomposition improves code organization and readability, but does not inherently make programs run faster.
143. Can we define array of classes in c++ ?
- a) Yes
- b) No
- c) N.A.
- d) N.A.
Answer: A - C++ supports arrays of objects: ClassName arrayName[size]; creates array of class instances.
144. What is true about a Constructor ?
- a) Its name is plural of class name.
- b) Its name has * symbol before it.
- c) Its name is same as of class name.
- d) Its name has # symbol before it.
Answer: C - Constructors are special methods with the exact same name as the class, used to initialize objects.
145. What are the three important manipulations done in a for loop on a loop variable?
- a) Updation, Incrementation, Initialization
- b) Initialization, Testing, Updation
- c) Testing, Updation, Testing
- d) Initialization, Testing, Incrementation
Answer: B - For loop structure: initialize counter, test condition, update counter after each iteration.
146. The browser uses _____ tag to detect javascript.
- a) js tag.
- b) scripting tag.
- c) script type="text/javascript" tag.
- d) javascript tag.
Answer: C - The <script type="text/javascript"> tag tells the browser to interpret the content as JavaScript.
147. Which of the ways below is incorrect of instantiating a date?
- a) new Date (dateString)
- b) new Date()
- c) new Date(seconds)
- d) new Date(year, month, day, hours, minutes, seconds, milliseconds)
Answer: C - JavaScript Date constructor accepts milliseconds, not seconds. Use new Date(milliseconds) or new Date(seconds * 1000).
148. Which are the different ways to enumerate all properties of an object?
- a) for...in loops
- b) Object.getOwnPropertyNames()
- c) Object.keys()
- d) All of the above
Answer: D - JavaScript provides multiple methods for property enumeration: for...in, Object.keys(), Object.getOwnPropertyNames().
149. What is the alternate name for Java script?
- a) LimeScript
- b) ECMScript
- c) Coffee Script
- d) ECMAScript
Answer: D - ECMAScript is the standardized specification for JavaScript, maintained by Ecma International.
150. JavaScript is designed for following purpose _____
- a) To Perform Server Side Scripting Opertion
- b) To Execute Query Related to DB on Server
- c) To add interactivity to HTML Pages
- d) To Style HTML Pages
Answer: C - JavaScript was created to add dynamic behavior and interactivity to web pages in the browser.
151. What is the most essential purpose of parentheses in regular expressions ?
- a) Define pattern matching techniques
- b) Define subpatterns within the complete pattern
- c) Define portion of strings in the regular expression
- d) All of the mentioned
Answer: B - Parentheses in regex create capturing groups, defining subpatterns for extraction and backreferences.
152. VB.Net identifiers:_____
- a) are case sensitive.
- b) can begin with an underscore.
- c) can begin with a number.
- d) Both a and b.
Answer: B - VB.NET identifiers are case-insensitive and can begin with underscore or letter, but not numbers.
153. An object is composed of:_____
- a) properties.
- b) events.
- c) method
- d) all of the above
Answer: D - Objects encapsulate properties (attributes), methods (behaviors), and events (notifications) in OOP.
154. What is the purpose of Invoke Method?
- a) Used to call any procedure
- b) Used to call the procedure through Delegate variable
- c) Both
- d) none
Answer: B - Invoke method calls a delegate on the thread that owns the control's handle (cross-thread calls).
155. The Button control can be activated:_____
- a) programmatically through the click event.
- b) by clicking the button with the mouse.
- c) with the forms DefaultButton property.
- d) Both a and b.
Answer: D - Buttons can be activated via mouse click, keyboard (Enter/Space), or programmatically via PerformClick().
156. Which task is accomplished in the Code editor?
- a) Adding forms to the project
- b) Adding controls to the form
- c) Adding event procedures to the form
- d) All of the above.
Answer: C - Code editor is for writing event handlers and logic; forms/controls are added via designer.
157. Which is not a main component of the Visual Studio IDE?
- a) Solution Explorer
- b) Tool Box
- c) Start Menu
- d) Designer Window
Answer: C - Start Menu is Windows OS component, not part of Visual Studio IDE.
158. 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 are harder to learn; intuitive visual elements make programs easier.
159. What is an object in C++ ?
- a) Object is part of syntax of a class.
- b) Object is datatype of a class.
- c) Object is an instance of a class.
- d) Object is function of a class.
Answer: C - An object is a concrete instance of a class blueprint, occupying memory at runtime.
160. Which of the following function of VBScript converts a given number of any variant subtype to Long?
- a) CDbl
- b) CInt
- c) CLng
- d) CSng
Answer: C - CLng() converts expressions to Long (32-bit integer) data type in VBScript.
161. Which of the following function of VBScript converts a given number of any variant subtype to Double?
- a) CDbl
- b) CInt
- c) CLng
- d) CSng
Answer: A - CDbl() converts expressions to Double (double-precision floating-point) data type in VBScript.
162. Which VBScript function converts an input string to all lowercase?
- a) LCase
- b) LowerCase
- c) Lower
- d) There is no such function to directly convert to lowercase.
Answer: A - LCase() converts all characters in a string to lowercase in VBScript.