CS508-Modern Programming Languages Quiz MCQs Lecture 1-22 Midterm Objective Questions | SUPERSTARWEBTECH

CS508-Modern Programming Languages Quiz MCQS #Objective #Questions #MidTerm
1. SIZE() and REPLACE() in SNOBOL4 are ___ functions.
  • primitive ✔
  • built-in
  • user defined
  • both primitive and built-in
2. Which of the following is a discrete type in Ada.
  • Modular type
  • enumeration type
  • Both of the above ✔
  • None
3. We use ___ operator for indirect referencing in SNOBOL
  • Unary dot(.)
  • Unary $ ✔
  • Binary dot(.)
  • Binary $
4. ___ is not a symbol in LISP
  • Testsymbol
  • Test-symbol
  • Test_symbol
  • Test symbol ✔
5. In Ada subprograms, the list of parameters is separated by ___
  • comma(,)
  • colon(:)
  • semicolon(;) ✔
  • dot(.)
6. How many element(s) are there in LISP list (a (b c))?
  • 1
  • 2 ✔
  • 3
  • 4
7. ___ function is used to forbid the evaluation of x in LISP
  • (setf x)
  • (setq x)
  • (quote x) ✔
  • (cons x)
8. Two-dimensional arrays are stored column-wise (column major) in:
  • ALGOL
  • BASIC
  • FORTRAN ✔
  • C#
9. Following statement returns the union of the two list in LISP
  • >(L1 UNION L2)
  • >(union L1 L2) ✔
  • >Union L1
  • >(L1 union L2)
10. A subprogram defined inside another subprogram can be used by ___
  • Parent only
  • Children only
  • Siblings only
  • Parent, Children and siblings ✔
11. Genetics allow parameterization of ___
  • Subprograms ✔
  • Variables
  • Programs
  • Objects
12. What is the size of the integer in SNOBOL?
  • 2 bytes ✔
  • 4 bytes
  • 8 bytes
  • 32 bytes
13. Table in SNOBOL can be used as ___
  • Pointers
  • Arrays ✔
  • Both arrays and pointers
  • Reference operator
14. Array index in Ada start from ___
  • Null ✔
  • Zero
  • One
  • Two
15. Which of the following functions assigns value 5 to symbol y?
  • >(setq 5 y)
  • >(setq.5.y)
  • (setq y 5) ✔
  • >(setq.y.5)
16. Ada is a ___ language
  • Typed
  • Strongly typed ✔
  • Weakly typed
  • Non typed
17. You can return structures but not ___ from a function in C programming language
  • Arrays ✔
  • Numbers
  • Pointers
  • References
18. A language that can be used for a wide domain of applications has higher ___
  • Portability
  • Generality ✔
  • Reliability
  • Readability
19. In earlier versions of FORTRAN, parameters were:
  • Pass by Value ✔
  • Pass by reference
  • Pass by Type
  • Only 1 byte could pass
20. The more orthogonal the designs the fewer the ___
  • Exceptions ✔
  • Bugs
  • Errors
  • Warnings
21. Prolog database is based upon ___
  • Facts
  • Facts and queries
  • Rules and queries
  • Facts and rules ✔
22. The statement true about Prolog “___”
  • It is string manipulation language
  • It is used for AI application ✔
  • It is a database language
  • Use both for AI application and as a database language
23. COBOL was the first language that brings the concept of ___
  • Records ✔
  • Structure
  • Object
  • Variable
24. Which language had great influence on high programming languages like C:
  • FORTRAN I
  • LISP
  • ALGOL68 ✔
  • COBOL
25. For immediate value assignment ___ sign is used 
  • %
  • &
  • $ ✔
  • *
26. Which of the following is not a symbol in Lisp
  • Testsymbol
  • Test symbol ✔
  • Test-symbol
  • Test_symbol
27. Following is the correct syntax of ‘for’ loop in Ada
  • for variable in low_value .. high_value loop
            (Loop body) end loop; ✔
  • for variable in low_value .. high_value loop
            (Loop body) end;
  • begin;
        for variable in low_value .. high_value loop
           — Loop body goes here
  • begin loop;

        for variable in low_value .. high_value

          –Loop body goes here
28. Which of following operator is used for concatenation of statement which is speared over more than one line in SNOBOL?
  • + ✔
  • +=
  • :=
  • ->
29. To make necessary arrangement for run time errors is called ___
  • Feature multiplicity
  • Error checking
  • Exception handling ✔
  • Debugging
30. The correct statement about SNOBOL ___
  • Poor readability
  • Good writability
  • Poor readability and writability ✔
  • Good readability

31. The block structure feature of ALGOL60 has ___ scope

  • No
  • Local ✔
  • Universal
  • Global
32. In the Decimal fixed point type, the distance between values is implemented as a power of ___
  • 2
  • 10 ✔
  • 8
  • 16
33. ___ operations must have one of its parameters of the tagged type
  • concurrent
  • synchronized
  • primitive ✔
  • generic
34. An understanding of implementation issues leads to a/an __________ of why languages are designed the way they are
  • Uncertainty
  • Understanding ✔
  • Misunderstanding
  • Confusion
35. Imperative programming languages are the direct result of ___
  • Charles Babbage engine
  • Logic or list program languages
  • Von Neumann architecture ✔
  • Language application domain
36. Which statement is true from programming language evolution perspective about 1970’s era?
  • Analysis and elaboration era
  • era of effective software technology ✔
  • era of object oriented programing languages
  • era of discovery and description
37. Variable name in SNOBOL may not be longer than ___
  • 150 characters
  • 250 characters
  • 500 characters
  • 120 characters ✔
38. If we have two spaces in SNOBOL the first is used for ___ and the second one for ___
  • concatenation, pattern matching ✔
  • immediate assignment, replacement
  • pattern matching, concatenation
  • as a whole assignment, immediate assignment
39. Which statement is correct about Table in SNOBOL?
  • Table is indexed by number ✔
  • Table is indexed by the key
  • Table can be indexed by both keys and numbers
  • Table cannot be indexed 
40. The first-level elements in LISP are called ___ level elements
  • First
  • Index
  • Top ✔
  • Priority
41. To write a user defined function in LISP we use ___
  • Setq
  • Defun ✔
  • Def fun
  • func
42. Function in LISP is in ___ notation.
  • postfix
  • infix
  • prefix ✔
  • none
43. ___ does not have a predefined inheritance hierarchy
  • ALGOL
  • PROLOG
  • C++
  • Ada ✔
45. Record in Ada is similar to structure in C/C++. Record members in Ada is accessed through a/an ___
  • (.)Dot Operator ✔
  • None
  • arrow operator
  • both arrow and dot operator
46. If the program written in a particular language is less ___ than the cost of failure of the system may be significant
  • Writable
  • Reliable ✔
  • General
  • Readable
47. The portability has direct relation with ___
  • Simplicity
  • Readability
  • Generalization
  • Standardization ✔
48. Identify the feature which was not available in FORTRAN-IV
  • support for structured programming ✔
  • logical IF statement
  • support for explicit type declaration
  • subprograms could also be passed as parameters
49. ___ is The First High Level Language
  • FORTRAN ✔
  • Ada
  • C
  • LISP
50. First language that provided the concept of Pointer data type was ___
  • COBOL
  • LISP
  • PL/I ✔
  • JAVA

Leave a Comment

Your email address will not be published. Required fields are marked *

CS508-Modern Programming Languages Quiz MCQs Lecture 23-45 Finalterm Objective Questions | SUPERSTARWEBTECH

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 ✔
  • Constants
  • Atoms
  • 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?
  • Two ✔
  • Three
  • Four
  • Five
6. In java, explicit conversion of primitive type is done by ___
  • aliasing
  • boxing
  • casting ✔
  • overloading
7. The interference mechanism of PROLOG is based upon ___
  • Forward chaining
  • Propositional logic
  • Back tracking ✔
  • Recursion
8. Dealing with unsafe/unmanaged code in ___ we have to compromise on the type safety.
  • C# ✔
  • Java
  • Ada
  • C++
9. There are no ___ types in java.
  • arrays
  • classes
  • enum ✔
  • boolean
10. In Prolog, a “member(X, T)” predicate is used to check the membership of X in ___
  • class
  • symbol
  • list ✔
  • both class and symbol
11. Unlike C/C++, arrays in PHP are ___
  • Maps ✔
  • Templates
  • Records
  • 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.
  • ‘IN’
  • ‘AS’
  • ‘IS’ ✔
  • ‘OUT’
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.
  • C# ✔
  • C++
  • Java
  • Ada
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.
  • C++
  • Java
  • Ada and C++
  • C# ✔
17. In C#, Managed code is executed under the control of 
  • CLR
  • CRL ✔
  • JVM
  • 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 ✔
  • MISL
  • Bytecode
  • 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

Leave a Comment

Your email address will not be published. Required fields are marked *