Forum

CS508 Quiz 2 Soluti...
 
Notifications
Clear all

CS508 Quiz 2 Solution


admin
Posts: 978
Admin
Topic starter
(@shahzain)
Member
Joined: 2 years ago

 

1) The correct syntax of “if statement” in LISP is:

  1. (if <else> <test> <then>)
  2. (if <test> <then> <else>)
  3. (if <else> <then> <test>)
  4. (if <then> <test> <else>)

 

2) In Ada language, which of the following is used for the initiation of concurrent tasks

  1. Generics
  2. Tagged types
  3. Subprograms
  4. Tasking

 

3) Discriminated Records in Ada are like ________ types in C.

  1. Intersection
  2. Union
  3. Join
  4. Set

 

4) In Ada, the correct way to declare a Boolean type with values of False and True is _______

  1. Type Boolean is (False, True);
  2. Type Boolean is (False; True);
  3. Type Boolean is (False: True);
  4. Type Boolean is (False, True);

 

5) In Ada, Boolean is a ________ enumeration type.

  1. Post-defined
  2. Pre-defined
  3. Client-defined
  4. User-defined

 

6) What will be the output of following LISP expression

> (/ 5.0 2)

  1. 2/5
  2. 4
  3. 5
  4. 5/2

 

7) A “while loop’ in Ada is terminated by _________ keywords.

  1. End loop
  2. Break
  3. Exit
  4. End while

 

8) In LISP, if predicate is false then output will be:

  1. 0
  2. T
  3. NIL
  4. F

 

9) In Ada, tagged type definition is performed in a ________.

  1. Template
  2. Package
  3. Structure
  4. Record

 

10) An _________ program has two types of elements: atoms and lists.

  1. Ada
  2. C++
  3. PROLOG
  4. LISA

 

Topic Tags
Share:
Scroll to Top