CS508-Modern Programming Languages Quiz MCQS #Objective #Questions #FinalTerm
1. In ___ for final fields and methods the value is assigned later but in ___ you assign the value during declaration.
- Java, C++
- C++, C#
- Java, C# ✔
- C++, Java
2. The concept of C# jagged array is similar in function to ___
- C++ rectangular Array
- Java Array of Array ✔
- Java pointer Array
- C# Array
3. ___ in PROLOG are loosely typed
- Variables ✔
- Both constants and variables
4. ___ is used to initialize values of arrays in C++ and Java
5. How many kinds of “type conversion” of primitive types are there in Java?
6. In java, explicit conversion of primitive type is done by ___
- casting ✔
7. The interference mechanism of PROLOG is based upon ___
- Forward chaining
- Propositional logic
- Back tracking ✔
8. Dealing with unsafe/unmanaged code in ___ we have to compromise on the type safety.
9. There are no ___ types in java.
- enum ✔
10. In Prolog, a “member(X, T)” predicate is used to check the membership of X in ___
- list ✔
- both class and symbol
11. Unlike C/C++, arrays in PHP are ___
- Maps ✔
- Both Templates and Records
12. 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
13. The ___ operator in C# is used to test if the operator is of a certain type.
14. ___ 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++
15. In ___ Boolean expression is convertible into integer type.
16. Managed or safe code in ___ is executed under the control of common language runtime (CLR) with automatic garbage collection, no explicit memory allocation and no explicit destructor.
- Ada and C++
- C# ✔
17. In C#, Managed code is executed under the control of
- CRL ✔
- Neither CLR or JVM
18. For event driven mechanism in C# we use ___ just like ___ in C++
- Event handler, Visual C++
- Event Buttons, Graphics code
- delegates, function pointer ✔
- function pointer, delegates
19. C# code when compiled is converted into ___ code.
- MSIL ✔
- machine native code
20. In C# to convert ___ into ___ and vice versa we use the concept of boxing.
- Object type, Primitive type ✔
- Primitive type, reference type
- reference type, value type
- value type, reference type