Cs508 Update Final Term Solved Mcqs by Junaid
Cs508 Update Final Term Solved Mcqs by Junaid
C
C and C++
121. The syntax of PHP foreach loop is similar to ------ loop.
C++ foreach
C# foreach
Java foreach
C++ for
122. With programming in -------- we state what and not how.
Prolog. P#92
Algol
C#
Fortran
123. When the type is fixed before run time then this is called as-----
Load time binding
Static binding
AL-JUNAID TECH INSTITUT
Dynamic binding
None of the given
124. A programming language is ------ typed if type error are ----- detected.
Weakly, Always
Always, weakly
Strongly, often
Strongly, always. P#171
125. All objects in java are ------
Explicit heap dynamic
Dynamic storage binding
Stack dynamic storage binding
Static storage binding
126. --------- usually a logical grouping of heterogeneous elements.
Array is
Record is. P#176
Structure is
Both Structure and Record are
127. In java the arithmetic expression evaluation order is always from ------
Center to right
Right to Left
Center to left
Left to right
128. A control structure is a --------- and the statement whose
execution it controls.
Control algorithm
AL-JUNAID TECH INSTITUT
Control statement. P#185
Control keyword
None of the given
129. In -------- control statements were based directly on IBM 704 hardware.
Ada
FORTRAN l p#185
FORTRAN 77
IBM Assembly language
130. We cannot pass array in ---------- by value as it has no fix size. But it has
fixed size in structure. C#
Java
C++
C
131. -------- is a language for symbolic computation and its syntax is based
on lambda calculus.
ALGOL
MATLAB
C
LISP p# 27
132. Ada is a -------- typed language.
Weakly
Random
Strongly. P#48
List
AL-JUNAID TECH INSTITUT
133. The integrity of types is checked from all together in -------
SNOBOL
ALGOL
Plankal Koll
Ada
134. A language is reliable if during execution it does not create ------
Result
Error
Bytecode
Malfunction
135. -------- is not a valid Prolog atom.
This _ is_ it
Mary, _c1
‘Hello'
F
136. ------- generates readable code which is easy to maintain.
Clauses
Backtracking. P#97
Inference mechanism
Facts
137. In C#, value type objects use memory of --------- data structure.
List
Tree
Stack
Heap
AL-JUNAID TECH INSTITUT
138.----------- is an 8-byte integer.
Short
Long
Byte
Char
139. Simple data structure and large floating point operations are linked to --------
Artificial intelligence language domain
Parallel programming domain
Scientific application programming domain
System programming domain
140. Each source file in ------ has a public class.
C++
C#
Java p#98
None of the given
141. There is no autonomic type conversion in -------
C
Both java and C++
Java
C++
142. Every class in java is part of some -----------
Subclass
Method
Package p#107
Object
AL-JUNAID TECH INSTITUT
143. Automatic garbage collection in java prevents ---------
Multithreading
Exception handling
Indirect referencing
Dangling pointer p#117
144. Value types in C# are inherited from ---------
Java primitive type
Object
Reference
None of the given
146. PHP supported all major Databases including ----------
None of the given
ODBC
ORACLE
SQL Server
147. In -------- the Break statement may have the optional
parameter or argument.
C/C++
Java
PHP
Java Script
148. Classes and objects of PHP are similar to --------
Classes and objects of C++
Classes and objects of java
Classes and objects of C
AL-JUNAID TECH INSTITUT
Classes and objects of Basic
149. ---------- operator in Prolog is used for List construction and also
for List dismantling.
!(Sign of exclamation)
: (Colon)
None of the given
150. In JavaScript --------- operator is used for concatenation.
Dot(.)
Plus(+). P#152
|
^
151. The resultant value of variable ‘x’ in JavaScript statement var x =
“5”-“2”; will be -------
5-2
52
“5”-“2”
3
152. The ------- model in JavaScript provides access to the contents of
the browser window.
DOM. P#155
BOM
ROM
AL-JUNAID TECH INSTITUT
COM
153. In ---------- we may specify the range and precision for
floating point numbers. C#
C/C++
Ada
Both Ada and C#
154. ------------- parameters are declared inside a subprogram.
Default
Actual
Formal
Copy
155. eq or equal operator in LISP is used to compare two ---------
Atom symbols
List symbols
Non numeric symbols
Numeric symbols
157. Object in JavaScript can be accessed through ---------
Associated array
Reference pointer method
Reference type
Both reference pointer method and reference type
158. Shortcut evaluation is not allowed for ------------
Boolean operators
Relational operators
Bitwise operators
AL-JUNAID TECH INSTITUT
Both boolean and relational operators
159. Which one of the following languages is designed for distributed
computing architecture?
CORBA
FORTRAN
ADA
LISP
160. In Ada elementary types are also termed as --------
User defined types
Static types
Built in types
Public types
161. Study of programming languages helps in increasing the --------- to express
programming concepts.
Capacity. P#5
Level
Volume
Range
162. --------- is the designer of C++ language.
Bjarne Stroustrup p#15
James Goslings
Mike Sheridan
Patrick Naughton
163. Set membership in Prolog is different from ---------- membership.
AL-JUNAID TECH INSTITUT
List
Symbol
Join
None of the given
164. ---------- support array with built in bounds checking.
Java
C++
C#
Both java and C# p#118
165. FORTRAN, PL 1 and BASIC language provide --------
Explicit declaration
Implicit declaration
Either implicit and explicit declaration
None of the given
166. There is no arithmetic expression precedence rule in -------
PASCAL
Small talk
SIMULA
C/C++
167. C/C++ has both pre-test and post-test version of ---------
Counter controlled loop
Logically controlled loop
For loop
While loop. P#192
168. C++ support only ------- mode parameter passing.
AL-JUNAID TECH INSTITUT
OUT
IN
Union
IN/OUT
169.java has eliminated the concept of ----------
Classes
Variables
Struck. P#31
Arrays
170. In java Explicit conversions are done through --------
Referencing
Aliasing
Casting. P#104
Operator overloaded
171. Prolog database is based upon --------
Facts
Facts and queries
Rules and queries
Facts and rules. P#82
172. A predicate many have ------ or more arguments.
Three
Zero. P#88
One
Two
173. --------- is used as a place holder for a value that is not required.
AL-JUNAID TECH INSTITUT
Variable
Atom
Constant
Anonymous variable. P#89
174. In C#, if you don’t use new keyword, you must ---------- all the values in
the struct by hand before you use it.
Define
Declare
Create
Initialize. P#135
175. Which statement best suited for C programming language?
String manipulation language
First language to provide exception handling
With powerful set of operators but poor type checking p#30
Introduce the notion of class
176. Which statement is true about SNOBOL?
Its developers are computer expert
ITE developers have limited introduction with computer science. P#46
Is an example of aspect programming languages
Have many data type
177. In SNOBOL, for entire assignment we use --------- operator in pattern
matching statement. $(dollar)
(.)Dot
Unary $(Dollar)
Binary space. P#36
AL-JUNAID TECH INSTITUT
178. Disjunction in Prolog is through -------- and conjunction is through ---------
Coma (,), OR
OR, coma(,)
OR, Dot(.)
Dot(.), OR
179. In ------- we can make a pointer variable of value type only.
C++
C#
Java
Both Java and C#
180. ---------- exception handling has a finally ( ) block.
Java
C++
C
Plankal kul
181. Which of the following statement is True if $a is not
identical to $b in php?
$a!==$b. P#143
$a!=$
$a=!$
$a=!$
182. --------- is the magical thing in Prolog.
Program partition
Inference engine
AL-JUNAID TECH INSTITUT
List processing
None of the given
183. In JavaScript navigator is ------------ object.
Built-in
Browser. P#155
Document
User defined
184. The concept of package in java is similar to ---------
Global class in C++
Assembly in C#
Global class in C#
Global Class in both C++ and C# p#130
185. Array in PHP are not like C/C++ array but they are ---------
Templates
Records
Maps
Both Templates and Records
186. “with” statement in JavaScript is an alternative of ---------
While statement
Union statement
Single document.write statements
Multiple document.write statements. P#161
187. Sub ranges of integer types are not compatible with --------
Integers types
188. Arrays in JavaScript are --------- based.
AL-JUNAID TECH INSTITUT
0
189. Unlike C/C++, arrays in PHP are ________.
Maps
Templates
Records
Both Templates and Records
190. Enumeration type in C# may take any type of ________ in contrast to C++
where it take only ________.
Numeric value, integer value
Value type value, numeric value
Primitive type value, reference type value
Value type value, reference type value
191. PHP syntax looks like ________.
ASP syntax
C/C++ syntax
Ada syntax
Both ASP and Ada
192. How many <script> tags can be used in the <head> element?
Zero
One
Two
Many
193. C# code when compiled is converted into ________ code.
MSIL
MISL
AL-JUNAID TECH INSTITUT
Bytecode
machine native code
194. In C#, strings are ________.
Non-Immutable
Immutable
Neither Immutable nor Non-Immutable
Aliasable
196. In ________ the relationship between a get and set method is inherited, while
in ________ it has to be maintained.
Java, C++
C++, C#
Ada, Java
C#, Java or C++
197. In ________ we can mke a pointer variable of value typr only.
C++
C#
Java
Both java and C++
198.In JavaScript, which of the given provides access to the contents of browser
window?
DOM
BOM
ROM
COM
199. A variable in ________ cannot be used unless and until it is not initialized.
AL-JUNAID TECH INSTITUT
C++
C#
ALGOL
C
200. In how many places a javascript code can be placed?
1
2
3
4
201. Which operator is used for concatenation in JavaScript?
+
|
$
dot(.)
202. Classes and objects of PHP are similar to ________.
Classes and objects of Java
Classes and objects of C++
Classes and objects of Basic
Classes and objects of C
203. Which of the following is not true about delegates?
Delegates are value type
Delegates are event based
Delegates are like C/C++ function pointer
Delegates are reference type
204. Which of the given statement is True if "$a" is not identical to "$b" in php?
AL-JUNAID TECH INSTITUT
$a != $
$a =! $
$a !== $b
$a ==! $
205. Which of the given operator is used to return a reference from a function in
PHP?
&
&&
$
Dot
206. Managed or safe code in ________ is executed under the control of common
language runtime (CLR) with automatic garbage collection, no explicit memory
allocation and de allocation and no explicit destructor.
C++
Java
Ada and C++
C#
207. In C# the value type and reference type variable are inter convertible through
________ concept.
Tagged type
Interfaces
Boxing
None of the given
209. Java code when compiled is converted into ________ code.
Bit code
Byte code
AL-JUNAID TECH INSTITUT
Kbytes code
Giga byte Code
211. In ________ Boolean expression is convertible into integer type.
C#
C++
JAVA
Ada
212. ________, an object that describes the basic characteristics of the browser,
notably its type and version.
Window
Document
Navigator
Location
213. In C# ________ can be inherited from other class but no inheritance from it.
On the other hand ________ cannot be inherited and not inheritance from it
possible.
Private class, public class
Sealed class, struct in C#
struct in C#, Sealed class
public class, inheritance class
214. To make necessary arguments at run time error is called-----
Type checking
Exception handling
Error handling
None of the given
AL-JUNAID TECH INSTITUT
215. In ------------ we have to address the client side compatibility issue.
JavaScript
VB Script
PHP
Perl
216. How to compare and examine language?
Readability
Writability
Reliability
All of the given options
217. In SNOBOL 2 spaces can be used, the purpose of 1st space is for -----------
and 2nd for -------
Pattern matching, String Concatenation
String concatenation, Pattern matching
String concatenation, String concatenation
Pattern matching, Pattern matching
218. Which of the following is an incorrect option from the following statements
regarding ‘objectives of learning new languages’?
Help to compare different languages.
Help in transition from one language to other language
Help in understanding the language piracy policy
Help to choose a language for development of a certain application
219. The more is the simplicity of a language, the more it will always be readable.
True
False
220. Value upon successful completion of pattern matching, the substring matched
AL-JUNAID TECH INSTITUT
by the pattern is assigned to the variable as -------
Value
String
Integer
Real numbers
221. The main design goals of Ada were EXCEPT
Program reliability and maintenance
Design language for DOD
Programming is a human activity therefore avoid unintentional mistakes
Designing a portable language
222. One of the major design goals of Ada was
To help developers to code the software in lesser time
To make it difficult for developers to make mistakes
To help develop an IDE for Ada
To make testers to test Ada application easily
223. We can have nested procedures in -------- language.
C++
Ada
C
PROLOG
224. Learning the implementation details of a language help in the efficient use of
that language.
True
False
225. Too much simplicity in language design can also cause problems.
AL-JUNAID TECH INSTITUT
True
False
226. In -----------, Enumeration type can also be used as indexes in arrays.
Ada
C
C++
LISP
227. In following is the correct syntax of ‘for’ statement in Ada.
for variable in low_value..high_value loop-Loop body goes here end loop;
for variable in low_value..high_value loop-Loop body goes here end;
begin; for variable in low_value..high_value loop-Loop body goes here end
loop;
begin loop; for variable in low_value..high_value loop-Loop body goes here
end loop;
228. Block statements in Ada is very different to a block in C.
True
False
229. ------------ represents the class of languages from functional paradigm.
LISP
PROLOG
Ada
C++
230. Which statement is wrong about static variables?
They are bound to memory cells before the execution of program
They use to direct access the memory
AL-JUNAID TECH INSTITUT
There is run time overhead of allocation and de-allocation of memory
Storage can’t be shared among variables
231. If you want an argument to a function to always be passed by reference, you
can prepend
Percentage sign (%) to the argument name in the function definition
Dollar sign ($) to the argument name in the function definition
An ampersand (&) to the argument name in the function definition
Tilled sign (~) to the argument name in the function definition
232. 146. PHP supported all major Databases including ----------
ODBC
ORACLE
SQL Server
All of the given options
233. Managed or safe code in ------------ is executed under the control of common
language runtime (CLR) with automatic garbage collection, no explicit memory
allocation and de allocation and no explicit destructor.
C++
Java
Ada and C++
C#
234. ------------ is more strongly typed language then -----------
C++, C#
C#, C++
C++, Java
None of the given
235. Enumeration type in C# may take any type of ------------- in contrast to C++
AL-JUNAID TECH INSTITUT
where it take only----------
Numeric value, integer value
Value type value, numeric value
Primitive type value, reference type value
236. -------- exception inherit from exception class and --------- exception is
anywhere in the program.
Java, C#
C++, C#
C#, Java
Java, C++
237. In ------ the relationship between a get and set method is inherited, while in --
------ it has to be maintained.
Java, C++
C++, C#
Ada, Java
C#, Java or C++
238. Which of the following is not true about delegates?
Delegates are value type
Delegates are event based
Delegates are like C/C++ function pointer
Delegates are reference type
239. There are ------“categories” of types in java.
Two NOTE: primitive type and reference type
Three
Four
AL-JUNAID TECH INSTITUT
Five
240. A variable in -------- cannot be used unless and until it is not initialized.
C++
C#
ALGOL
C
241. Prolog is considered to be as ---------
Case and type insensitive
Case and type sensitive
Case sensitive and type insensitive
Case insensitive and type sensitive
242. In java, out-of-bounds array index is always causes a ------- error.
Syntax
Compile time
Runtime
Logical
244. In prolog, a “member(X, T)” predicate is used to check the membership of X
in -------
Class
Symbol
List
Both class and symbol
245. ------- cannot be converted to other types in java.
Booleans
Char
AL-JUNAID TECH INSTITUT
Double
Int
246. The --------- operator in C# is used to test if the operator is of a certain type.
“IN”
“AS”
“IS”
“OUT”
247. In C# the “If” statement condition is an/a ------
Arithmetic Expression
Variable Expression
Numeric Expression
Boolean Expression
248. In JavaScript, which of the given provides access to the contents of browser
windows?
ROM
DOM
COM
BOM
249. Which of the given is used before the declaration of variable in PHP?
# Sign
? Sign
$ Sign
@ Sign
250. The “IS” operator in C# is used for runtime ------------
Type conversion
AL-JUNAID TECH INSTITUT
Type casting
Type tagging
Type checking
256. PHP stands for ----------
PHP, Home Page
PHP, Hypertext page
PHP, Hypertext Preprocessor
PHP, Home Preprocessor
257. In PHP, if a number is beyond the bounds of the integer type then it will be
interpreted as a --------- instead.
String
Short
Long
Float
259. Which of the following is very effective is solving complex puzzles?
FORTRAN
PROLOG
ALGOL
C/C++
260. The program is written in C# compiles to:
Machine code
An intermediate language (IL)
Object code
Source code
260. Concurrency in java is supported through:
AL-JUNAID TECH INSTITUT
Resource allocation
Batch execution
Threads
Operator Overloading
262. Which of the following are lightweight processes in java?
Threads
Packages
Applets
JVM
263. The methods that allow two threads to cooperate (or synchronize) with each
other in a java program are:
Wait() and run()
run() and notify()
Wait() and notify()
sleep() and yield()
264. In how many ways threads can be created in java?
Two
Many
Three
Four
265. C# language is very similar to:
Prolog
C-language
Delphi
Java
AL-JUNAID TECH INSTITUT
266. Which of the following method is used to implement runable interface in
java?
Stop Thread()
Run Thread()
Stop()
Run()
267. Which of the following method in a java class cannot be changed
(overridden) in a subclass?
Public void display (){-}
Public static void area (){-}
Private void radius (){-}
Public final void result (){-}
268. In C#, the name of class and the name of the file in which it is saved.
Must start with lowercase letter
Must start with uppercase letter
Must match up
Do not need to match up
269. PHP supports various data types excepts ------
Integer
Array
Object
Char
270. Which of the given operator is used to return a reference from a function in
PHP?
&
&&
AL-JUNAID TECH INSTITUT
$
Dot
271. An ----------- in PHP is an ordered map.
Array
Queue
Stack
String
272. In --------- the “break” statement may have an optional parameter or
argument.
C/C++
Java
PHP
C#
273. In PHP “switch” structure, the ---------- starts or implements an implicit loop.
Break statement
For loop
Continue statement
Return statement
274. C# provides the feature of built-in bounds checking of:
Functions and classes
Objects and methods
Arrays and strings
Interfaces and packages
275. Which of the following keywords is used to make a class non-extendable in
java?
AL-JUNAID TECH INSTITUT
Static
Private
Final
Public
276. In a PROLOG program, the definitions of predicate sentences or phrase are
known as:
Facts
Clauses
Declaration
Inferences
NOTE: Clauses
Clauses are definition(s) of Predicate sentence or phrase.
277. What happens when you don’t initialize the fields in the constructor of a java
class?
A compile-time error occurs
Logical error occurs
Default values are assigned WICKIPEDIA
Runtime error occurs
278. Expert system ---------- provide a structure to design expert system.
Techniques
Shells
Lists
Mechanism
279. The inference mechanism of PROLOG is based upon ----------
Forward chaining
Back tracking
AL-JUNAID TECH INSTITUT
Propositional logic
Recursion
280. What happens when you try to use an out-of bounds array index in JAVA?
Array size is automatically incremented
A runtime error occurs
A garbage value is printed
Nothing happens
281. Which of the following is treated as an atom and not as a List data type in
PROLOG?
[a, t,o,m]
[a,b,c]
[a]
[]
282. How many types of arrays are available in C#?
Four
Two
Three
One
283. All java classes (built-in or user-defined) are sub-classes of --------- class.
Thread
System
Object
Throwable
NOTE:
In Java, all classes (built-in or user-defined) are (implicitly) subclasses of the class
Object.
AL-JUNAID TECH INSTITUT
284. The scripts written in PHP are executed by:
Client machine
Web server
Web browser
Java Applet
285. The head and tail of a list in PROLOG is separated by:
Semicolon (;)
Comma (,)
Vertical bar(|)
Colon (:)