CS508 Quiz 2 Solution and Discussion
-
Quiz No 2 Total Questions : 10
Please read the following instructions carefully!Quiz will be based upon Multiple Choice Questions (MCQs). You have to attempt the quiz online. You can start attempting the quiz any time within given date(s) of a particular subject by clicking the link for Quiz in VULMS. Each question has a fixed time of 90 seconds. So you have to save your answer before 90 seconds. But due to unstable internet speeds, it is recommended that you should save your answer within 60 seconds. While attempting a question, keep an eye on the remaining time. Attempting quiz is unidirectional. Once you move forward to the next question, you can not go back to the previous one. Therefore before moving to the next question, make sure that you have selected the best option. DO NOT press Back Button / Backspace Button while attempting a question, otherwise you will lose that question. DO NOT refresh the page unnecessarily, specially when following messages appear Saving... Question Timeout: Now loading next question... Javascript MUST be enabled in your browser; otherwise you will not be able to attempt the quiz. If for any reason, you lose access to internet (like power failure or disconnection of internet), you will be able to attempt the quiz again from the question next to the last shown question. But remember that you have to complete the quiz before expiry of the deadline. If any student failed to attempt the quiz in given time then no re-take or offline quiz will be held.
-
_________ operator in Prolog is used for List construction and also for List dismantling. CS508
!(Sign of exclamation)
|(Vertical Slash) PG # 90
:(Colon)
None of the given -
the concept of c# jagged
Jagged Arrays (array-of-arrays) A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an “array of arrays.” A special type of array is introduced in C#
-
In java, explicit conversion of primitive type is done by _________ CS508
aliasing
boxing
casting
overloading -
_____ is used to initialize values of arrays in C++ and Java. CS508
[]
()
{} -
CS508 - Modern Programming Languages - Q. No. 1
In C# Managed code is executed under the control of
CLR CRL
CS508 - Modern Programming Languages - Q. No. 2
_____is more strongly typed language then _________
C++, C# C#, C++ C++, Java None of then given
CS508 - Modern Programming Languages - Q. No. 3
The IS operator in C# is used for_________
Run time type conversion Run time type checking Run time type casting None of the given
CS508 - Modern Programming Languages - Q. No. 4
PHP is a __________typed language.
Strongly Dynamic Static None of Given
CS508 - Modern Programming Languages - Q. No. 5
____ compile into machine independent language, independent code which run in a managed execution environment.
C# Java C++ Ada
CS508 - Modern Programming Languages - Q. No. 6
PHP supported all major Databases including______.
ODBC Oracle SQL Server None Of given
CS508 - Modern Programming Languages - Q. No. 7
______compile initially to an intermediate. Which can be run by interpretation or just in time compilation or an appropriate virtual machine?
C++ and C# C# and Java Java and C++ Ada , C++
CS508 - Modern Programming Languages - Q. No. 8
The keyword unsafe is used while dealing with_____
Loop Arrays Pointers Classes
CS508 - Modern Programming Languages - Q. No. 9
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
CS508 - Modern Programming Languages - Q. No. 10
Tasks in ____are processes and cannot share data but thread in _______ do it.
C# , C++ C++ , Ada Java , C# Ada , Java
CS508 - Modern Programming Languages - Q. No. 11
C# code when compiled is converted into ________ code.
MSIL MISL
CS508 - Modern Programming Languages - Q. No. 12 of
In C# _____can be inherited from other class but no inheritance from it. On the other hand _________ cannot be inherited not inheritance is possible from it is possible.
Private class , public class Sealed class ,struct in C# struct in C# , Sealed class public class , inherited class
CS508 - Modern Programming Languages - Q. No. 13
The concept of sealed class in C# is similar to ________
Struct in C#, Struct in C++ Abstract class in C# None of the given
CS508 - Modern Programming Languages - Q. No. 14
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#
CS508 - Modern Programming Languages - Q. No. 15
In C# the if statement condition is an/a ________
Arithmetic expression Boolean expression Numeric expression Both Numeric expression and Boolean expression
CS508 - Modern Programming Languages - Q. No. 16
Java code when compiled is converted into ________ code.
Bit code Byte code Kbytes code Giga byte Code
CS508 - Modern Programming Languages - Q. No. 17
PHP is a __________typed language.
Strongly Dynamic Static None of Given
CS508 - Modern Programming Languages - Q. No. 18
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++
CS508 - Modern Programming Languages - Q. No. 19
C# code when compiled is converted into ________ code.
MSIL MISL
CS508 - Modern Programming Languages - Q. No. 20
In______ Boolean expression is convertible into integer type.
C# C++ JAVA Ada
CS508 - Modern Programming Languages - Q. No. 21
PHP syntax looks like ____________
ASP syntax C/C++ syntax
CS508 - Modern Programming Languages - Q. No. 22
For narrowing conversion which type conversion is appropriate?
Implicit Conversion Explicit Conversion
CS508 - Modern Programming Languages - Q. No. 23
In Java we can make pointer of_________.
Any type Reference type only
CS508 - Modern Programming Languages - Q. No. 24
In C# the value type and reference type variable are interconvert able through ________ concept.
Tagged type Boxing Interfaces None of the given
CS508 - Modern Programming Languages - Q. No. 25
C# support only_________ inheritance and it achieve_________ inheritance through the concept of interfaces.
Multiple, multiple Single, multiple
CS508 - Modern Programming Languages - Q. No. 26
Tasks in ____are processes and cannot share data but thread in _______ do it.
C# , C++ C++ , Ada Java , C# Ada , Java
CS508 - Modern Programming Languages - Q. No. 27
The concept of package in Java is similar to _________
Assembly in C# Global class in C#
CS508 - Modern Programming Languages - Q. No. 28
The concept of C# jagged array is similar in function to _________
C++ rectangular Array Java Array of Array Java pointer Array C# Array
CS508 - Modern Programming Languages - Q. No. 29
In C# _____can be inherited from other class but no inheritance from it. On the other hand _________ cannot be inherited not inheritance is possible from it is possible.
Private class , public class Sealed class ,struct in C# struct in C# , Sealed class public class , inherited class
CS508 - Modern Programming Languages - Q. No. 30
The concept of sealed class in C# is similar to ________
Struct in C#, Struct in C++ Abstract class in C# None of the given
-
____ compile into machine independent language, independent code which run in a managed execution environment. CS508
C#.
Java.
C++.
Ada -
Dealing with unsafe/unmanaged code in _______ we have to compromise on the type safety. CS508
C++
C#
Java
Ada -
Question # 1 of 10 ( Start time: 11:23:02 PM ) Total Marks: 1
The _________ in Java is passed by value but ______ is passed by reference.
Select correct option:
Object , Parameters
Parameters , Object
Arguments , Reference type
Reference type , Primitive typeQuestion # 2 of 10 ( Start time: 11:23:42 PM ) Total Marks: 1
Which of the following are the types of constants in Prolog
Select correct option:
atoms and numbers.
single and decimal
short and char
float and numbersQuestion # 3 of 10 ( Start time: 11:23:58 PM ) Total Marks: 1
In Java the ______________are not objects. All of the rest are objects, or any ___________ is called as object.
Select correct option:
generic type , reference type
primitive types , generic type
Reference type , generic type
Reference type , primitive typesQuestion # 4 of 10 ( Start time: 11:24:35 PM ) Total Marks: 1
In Java which of the following is not Primitive Type
Select correct option:
byte
short
decimal
intQuestion # 5 of 10 ( Start time: 11:24:56 PM ) Total Marks: 1
Prolog is considered to be as ________
Select correct option:
case and type insensitive
case and type sensitive
case sensitive and type insensitve
case insensitive and type sensitiveQuestion # 6 of 10 ( Start time: 11:25:14 PM ) Total Marks: 1
In Prolog language____is used for comments.
Select correct option:
//
%
&
’Question # 7 of 10 ( Start time: 11:25:25 PM ) Total Marks: 1
Method that would be free functions in _________(not members of any class) should be static method in _________.
Select correct option:
Java , C#
C++ , C#
Java , C++
C++ , JavaQuestion # 8 of 10 ( Start time: 11:25:42 PM ) Total Marks: 1
For inheritance we use______ for interface we use________ keywords.
Select correct option:
subclass:baseclass , virtual function
overloaded , virtual
extend , implement
virtual function , overloadedQuestion # 9 of 10 ( Start time: 11:26:12 PM ) Total Marks: 1
In ________ for final fields and methods the value is assigned later but in ______ you assign the value during declaration.
Select correct option:
Java , C++
C++ , C#
Java , C#
C++ ,JavaQuestion # 10 of 10 ( Start time: 11:26:41 PM ) Total Marks: 1
The Java Bytecode is created by the Java compiler and is stored in ____ file
Select correct option:
.exe
.sys
.class
.jvm -
Which of the following is not true about delegates? CS508
Delegates are value type
Delegates are reference type
Delegates are similar to function pointers. C/C++Page 128
Delegates are similar to function pointers. C/C++ function pointers lack instance-based
knowledge whereas C# delegate are event based can be thought of a call-back mechanism
where a request is made to invoke a specified method when the time is right.In Java, out-of-bounds array index always causes a _______ error. CS508
Syntax
run timeIn C# _____can be inherited from other class but no inheritance from it. On the other hand _________ cannot be inherited and not inheritance from it is possible.
In Prolog language____is used for comments. CS508
//
%
\
**In Prolog % is used to write a comment just like // in C++. That is after % everything till the end of the line is a comment.
-
Which of the following is not primitive type in java?
Array
-
There are _____ “categories” of types in java.
-
Enumeration type in C# may take any type of _______ in contrast to C++ where it take only _________
-
In C# the value type and reference type variable are inter convertible through ________ concept.
-
The concept of C# jagged array is similar in function to _________
-
_____is more strongly typed language then _________


100% Off on Your FEE Join US! Ask Me How?


