Skip to content
GK24
Computer AwarenessMediumAsked in: Delhi · 7 Aug 2021, Shift 2

Which of the following statements is/are correct regarding code walk-through in software development? I. It is an informal technique for analyzing code. II. It is performed just before coding the module.

  1. A.Neither I nor II
  2. B.Only I
  3. C.Both I and II
  4. D.Only II

Correct answer

B. Only I

Explanation

The correct answer is B, only I. A code walk-through is an informal review technique: a few team members read a module line by line, mentally execute it on sample data and note the defects they find, without the checklists, metrics and formal records of an inspection. Statement I is therefore correct. Statement II is wrong on timing, because a walk-through can only be held after the module has been coded; there is no code to walk through before coding. That makes option D, only II, wrong, and option C, both, wrong as well. Option A is wrong because statement I is sound. The learning point is the pair: a walk-through is informal and conducted after coding, while a code inspection is formal, uses a checklist of common error types and produces a written report.

Read the full article: Algorithms, Flowcharts and SDLC: Symbols, Models and PYQs

View all
Q1.Computer AwarenessEasy

Which symbol is used to represent a decision in a flowchart?

  1. A.Oval
  2. B.Rectangle
  3. C.Diamond
  4. D.Parallelogram
Show answer
Correct answer: C. Diamond

Explanation

The correct answer is C, diamond. The diamond or rhombus is the decision symbol: it holds a condition and has one entry with two exits, marked Yes and No, so the flow branches according to the test. Option A is wrong because the oval, also drawn as a rounded rectangle, is the terminal symbol used only for Start and Stop. Option B is wrong because the rectangle is the process symbol, used for a calculation or an assignment such as adding two numbers and storing the sum. Option D is wrong because the parallelogram is the input or output symbol, used when a value is read from the user or a result is printed. Candidates most often swap the rectangle and the parallelogram, so fix the pair in memory: rectangle does the work, parallelogram talks to the outside world, and the diamond decides.

Q2.Computer AwarenessEasy

In a flowchart, the oval or rounded shape is used to show:

  1. A.Start and Stop
  2. B.A subroutine call
  3. C.A decision
  4. D.The direction of flow
Show answer
Correct answer: A. Start and Stop

Explanation

The correct answer is A, Start and Stop. The oval is the terminal symbol, and a well-formed flowchart has exactly one Start terminal and at least one Stop terminal; a chart that can never reach a Stop describes an infinite loop and so breaks the finiteness property of an algorithm. Option B is wrong because a subroutine or module call is shown by the predefined process symbol, a rectangle with double lines along its sides. Option C is wrong because a decision is shown by the diamond, which branches into Yes and No. Option D is wrong because the direction of flow is shown by the arrow or flow line, which carries the eye from one symbol to the next; by convention the chart is read from top to bottom and from left to right. Learning the seven standard symbols covers almost every flowchart question.

Q3.Computer AwarenessEasy

The word algorithm is derived from the name of which mathematician?

  1. A.Euclid
  2. B.Al-Khwarizmi
  3. C.Charles Babbage
  4. D.Blaise Pascal
Show answer
Correct answer: B. Al-Khwarizmi

Explanation

The correct answer is B, Al-Khwarizmi. Muhammad ibn Musa al-Khwarizmi was a ninth-century Persian mathematician and astronomer whose treatise on calculation with Hindu-Arabic numerals reached Europe in Latin translation; his Latinised name produced the word algorithm, and another of his works gave the word algebra. Option A is wrong because Euclid is remembered for geometry and for the Euclidean algorithm for the greatest common divisor, but the word itself does not come from his name. Option C is wrong because Charles Babbage designed the Difference Engine and the Analytical Engine and is called the father of the computer, not the source of this word. Option D is wrong because Blaise Pascal built the Pascaline, an early mechanical adding machine, and has a programming language named after him. Expect this as a one-mark definition question.

Q4.Computer AwarenessMedium

The worst-case time complexity of binary search on a sorted array of n elements is:

  1. A.O(n)
  2. B.O(n log n)
  3. C.O(log n)
  4. D.O(n squared)
Show answer
Correct answer: C. O(log n)

Explanation

The correct answer is C, O(log n). Binary search compares the key with the middle element and throws away half the array at every step, so the number of comparisons grows with the logarithm of the array size; an array of a million sorted items needs about twenty comparisons. The method works only on data that is already sorted, which is the condition examiners like to test. Option A is wrong because O(n) is linear search, which looks at the elements one after another and does not need sorted data. Option B is wrong because O(n log n) is the complexity of the efficient sorting algorithms such as merge sort and heap sort, not of a search. Option D is wrong because O(n squared) describes the simple sorts, namely bubble sort, selection sort and insertion sort in their worst case. Remember that Big-O keeps only the dominant term.

Q5.Computer AwarenessAsked in: Delhi · 7 Aug 2021, Shift 1Medium

What is the other name of Linear Sequential model in software engineering?

  1. A.Spiral model
  2. B.Prototype model
  3. C.Waterfall model
  4. D.RAD model
Show answer
Correct answer: C. Waterfall model

Explanation

The correct answer is C, the Waterfall model. The Waterfall model is called the linear sequential model because the project flows in one direction through requirement analysis, design, coding, testing, deployment and maintenance, with each phase completed and signed off before the next begins and no overlap between them. It suits only projects whose requirements are frozen at the start. Option A is wrong because the spiral model, given by Barry Boehm, is risk-driven and repeats planning, risk analysis, engineering and evaluation in loops, so it is anything but linear. Option B is wrong because the prototype model builds a throwaway working mock-up to collect user feedback before the real build. Option D is wrong because RAD, or rapid application development, assembles the product quickly from reusable components with heavy user involvement, again not a single straight line of phases.