MCQ Bank
In__________, there is no need to declare a variable and it takes the form of assigned value.
- A) Ada
- B) C
- C) SNOBOL
- D) ALGOL
Ada is a _____________ language
- A) Weakly typed
- B) Poorly designed
- C) Grammar free
- D) Strongly typed
Ada programming language supports _______ types of loops.
- A) 5
- B) 4
- C) 2
- D) 3
Identify the correct syntax of ‘while’ loop in Ada language:
- A) while condition loop -- loop body end loop;
- B) while (condition) -- loop body end while;
- C) loop while (condition) -- loop body end while;
- D) while (condition) { --loop body; };
The correct syntax of ‘for’ loop in Ada is:
- A) begin loop; for variable in low_value .. high_value loop -- Loop body goes here end loop;
- B) begin; for variable in low_value .. high_value loop -- Loop body goes here end loop;
- C) for variable in low_value .. high_value loop -- (Loop body) end loop;
- D) for variable in low_value .. high_value loop -- (Loop body) end;
In Ada language, _________ are used for encapsulation.
- A) Records
- B) Packages
- C) Variables
- D) Functions
Array index in Ada:
- A) must be an integer
- B) cannot be a character
- C) can be of any discrete type
- D) should always be a floating point number
Concurrency in Ada language is achieved through _______________.
- A) Packages
- B) Classes
- C) Tasking
- D) Controls
Which of the following statement is true regarding ‘tagged type’ in Ada language?
- A) It can be extended.
- B) It cannot be used to declare an object.
- C) It is similar to templates in C++
- D) It is another form friend function
The enum type of Ada langauge is different from the enum type of C language as no____________ on Ada enum type is performed.
- A) arithmetic operation
- B) boolean operation
- C) logical operation
- D) relational operation
Which of the following is a correct way to raise an exception in Ada?
- A) raise overFlow;
- B) raises overFlow;
- C) raises exception overFlow;
- D) raised overFlow;
Which of the following statement is true regarding arrays in Ada language?
- A) Array can be created for integers only.
- B) Array cannot have more than 10 elements.
- C) Array can be defined without a specific size.
- D) An array index must always start from 0.
Extensible types in Ada language are created through:
- A) Operator Overloading
- B) Tagged types
- C) Packages
- D) Dynamic programming
In LISP programming language, lists can be constructed with the help of three basic functions which are ___________.
- A) cons, list and append
- B) cons, append and scheme
- C) list, atoms and append
- D) scheme, common lisp and cons
Which of the following feature of Ada language is similar to the pointers in C++ ?
- A) Records
- B) Access Types
- C) Arrays
- D) Structures
The first-level elements in LISP are called ________level elements.
- A) Priority
- B) First
- C) Index
- D) Top
Correct syntax to declare a tagged type named as 'student' in Ada language is:
- A) type student :=tagged record
- B) type student is tagged record
- C) type student :: tagged record
- D) student := type tagged record
Which of the following is a correct way to declare an array of 10 elements named as ‘student’ of integer type in Ada language?
- A) type student is array (1..10) of Integer;
- B) int array student [10];
- C) array student [10]: int
- D) int student[10];
The most important concept in LISP programming language is:
- A) Symbol
- B) List
- C) Object
- D) Function
Consider the following two statements written in Ada: type Months is (January, February, March, April, May, June, July); type Monthly_Sales is array(Months) of Float; What is size of array named ‘Monthly_Sales’?
- A) 2
- B) 7
- C) 8
- D) 3