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