MCQ Bank
How many choices are possible when using a single if-else statement?
- A) 4
- B) 3
- C) 1
- D) 2
In background, insertion sort algorithm works on _______ code.
- A) ASCII
- B) UTF-16
- C) ANSI
- D) Hexadecimal
Write a program that prints "Pass" if the CGPA is greater than or equal to 2.0 and "Fail" otherwise.
- A) if (CGPA > 2.0) { cout << "Pass"; } else { cout << "Fail"; }
- B) if (CGPA == 2.0) { cout << "Pass"; } else { cout << "Fail"; }
- C) if (CGPA >= 2.0) { cout << "Pass"; } else { cout << "Fail"; }
- D) if (CGPA < 2.0) { cout << "Pass"; } else { cout << "Fail"; }
The Binary Search Algorithm, what will be the mid value in second level of recursion in the following array.
{45, 77, 89, 90, 94, 99, 100} and key = 99
- A) 89
- B) 90
- C) 99
- D) 94
What would be the next statement?
Def findmax():
Max = first number in the list
Current = second number in the list
While (elements in the list exist)
- A) Max=current
- B) Max=value
- C) Current = next value in the list
- D) If (max<current)
What is a correct expression for finding factorial where f = 1 , i=1;
While (i<=n)?
- A) F=f*n
- B) F=f2n
- C) F=f-n
- D) F=f+n
Which of the following symbol is used to represent Boolean operator for logical AND?
- A) ||
- B) &|
- C) &&
- D) !&
A----------- alters the execution sequence of the program
- A) Control statement
- B) Assignment statement
- C) Modulus
- D) Division
How is the illusion of parallel processing achieved when only one CPU is available?
- A) Each activation is assigned to a separate CPU core
- B) Activations share the time of the single processor
- C) Animations are executed in a sequential manner
- D) Multiprogramming systems are employed
Which one is not a valid data type?
- A) Int
- B) Char
- C) Float
- D) Html
What does the imperative paradigm, also known as the procedural paradigm, represent in the programming process?
- A) Traditional approach to programming
- B) Functional programming approach
- C) Object-oriented approach
- D) Linear scale development