MCQ Bank
What is the significance of the termination condition in the context of loop control?
- A) It prevents the loop from executing the body
- B) It ensures the termination of the looping process
- C) It has no impact on loop control
- D) It ensures the loop body is executed indefinitely
What will be the output of the loop for the given example? int i=1; while(i<7) { cout<<i; i=i+2; }
- A) 1357
- B) 135
- C) 1234567
- D) 7654321
What does the imperative paradigm define in the programming process?
- A) Development of a sequence of commands
- B) Programming paradigms
- C) Linear scale position
- D) Declarative programming approach
What are the three activities involved in the control of a loop structure?
- A) Start, Stop, Proceed
- B) Launch, Halt, Adjust
- C) Initialize, Test, Modify
- D) Begin, End, Continue
For Sequential Search Algorithm technique, it is _____________ to be list as sorted in alphabetic order in case of names list.
- A) Optional
- B) Mandatory
- C) Sometimes mandatory
- D) Not Mandatory
The set of instructions in a computer language, to get the desired result is known as:
- A) A decision table
- B) An algorithm
- C) A pseudo code
- D) A program
Float CGPA=2.5;
If (CGPA>=3.0)
Cout<<”Give Scholarship”;
Else
Cout<<”Sorry you do not qualify for the scholarship”;
It will show output
- A) Display none
- B) Give Scholarship
- C) Good
- D) Sorry you do not qualify for the scholarship
A program that is believed to be correct and a program that is correct. The two are
- A) Not necessarily same
- B) Totally same
- C) Same
- D) Not same
What will be the value of "f" after the first iteration of the while loop in the given pseudo-code? f = 1 i=1; While (i<=n): f=f*i; i=i+1;
- A) 1
- B) 2
- C) Cannot be determined
- D) n
What is the primary role of the control process in a loop structure?
- A) To reduce the flexibility of the algorithm.
- B) To avoid stepwise refinement.
- C) To guide the repetition of the loop.
- D) To execute the body of the loop.
Reason behind the Welsch NHS IT Failure was
- A) Weather conditions
- B) Software Technical issue
- C) Software Security issues
- D) Employees training
In the algorithm of Sequential search, what indicates a successful search from the given cases?
- A) Reaching the end of the list
- B) List is empty
- C) Equality of TargetValue and TestEntry
- D) Target value is greater than TestEntry
An alternative to translators
- A) Interpreter
- B) Mnemonics
- C) Compiler
- D) Assembler
Which of the following data type will be used for a variable having string of symbols and alphabets.
- A) Character
- B) Boolean
- C) Float
- D) Integer
Which of the following language is related to Object Oriented Paradigm.
- A) Python
- B) Smalltalk
- C) LISP
- D) Prolog
In the Ada programming language, what is the equivalent term for an "activation" in the context of concurrent processing?
- A) Function
- B) Process
- C) Task
- D) Operation
The set of tasks that ensures the software is correctly implements a specific function is known as
- A) Modularity
- B) Requirement gathering
- C) Validation
- D) Verification
In the pseudocode, what is the initial value of the variable max? def FindMax(): max = first number in the list Current = second number in the list While (elements in the list exist) If (max<current) max=current Current = next value in the list
- A) The maximum value representable in the programming language
- B) The first element in the list
- C) The second element in the list
- D) The last element in the list
A paradigm works on object called
- A) Functional paradigm
- B) Imperative paradigm
- C) Object oriented paradigm
- D) Declarative paradigm
In what case the statement "Give Scholarship" will NOT be executed in the following code? if (CGPA>=3.0) cout<<”Give Scholarship”; else cout<<”Sorry you do not qualify for the scholarship”;
- A) For any CGPA value above three
- B) Both statements will be executed in any case
- C) For CGPA value 2.9 or below
- D) CGPA is equal to three