Complete Subject Question Bank
Stephany is learning to draw a flowchart to calculate the area of a circle. Select the appropriate option that would fit into the process section of the flow chart?
Correct answer: Area=3.14*radius*radius.
Arrange the words given below in a meaningful sequence. 1. Word 2. Paragraph 3. Sentence 4. Letters 5. phrase
Correct answer: 4,1,5,3,2.
Identify the meaningful variable names which can be used?
Variable names should not start with a number, should not have spaces in between, should not start with symbols except dollar( $ ) and underscore( _ )
Choose the correct and meaningful pseudo-code to add two numbers?
Correct answer: BEGIN DECLARE number1,number2,sum READ number1,number2 sum<----number1+number2 PRINT sum END.
Match the appropriate Flowchart symbols with its purpose. Start/Stop Flow direction Connector Decision making Process Input/output
The standard flowchart symbols match: oval=Start/Stop, arrow=Flow direction, circle=Connector, diamond=Decision, rectangle=Process, parallelogram=Input/output.
1Which of the following represents the correct sequence for the given pseudo-code? BEGIN ------------- ------------- ------------- ------------- END a. READ number1 and number2 DECLARE variables number1, number2, result result <- number1 * number2 PRINT result b. DECLARE variables number1, number2, result result <- number1 * number2 READ number1 and number2 PRINT result c. DECLARE variables number1, number2, result READ number1 and number2 PRINT result result <- number1 * number2 d. DECLARE variables number1, number2, result READ number1 and number2 result <- number1 * number2 PRINT result
Correct answer: DECLARE variables number1, number2, result result <- number1 * number2 READ number1 and number2 PRINT result.
Expression is a combination of ___________, ____________ and _______________
Expression is a combination of operands and operators. This operand can be a variable or a constant
Which of the following represents the correct sequence for the given algorithm? a. Start Get the two numbers. Add the two numbers and store the result in sum. Display the sum value. Stop b. Start Add the two numbers and store the result in sum. Get the two numbers. Display the sum value. Stop c. Get the two numbers. Start Add the two numbers and store the result in sum. Display the sum value. Stop d. Start Get the two numbers. Display the sum value. Add the two numbers and store the result in sum. Stop
Correct answer: Start Get the two numbers. Add the two numbers and store the result in sum. Display the sum valu.
Choose the correct arrang5eme2nt of2 ma4them8atical symbols to make the equation true. a. 600 [+] 400 [] 800 [×] 300 [/] 200 = 200 b. 600 [/] 400 [+] 800 [] 300 [×] 200 = 200 c. 600 [×] 400 [/] 800 [-] 300 [+] 200 = 200 d. 600 [] 400 [+] 800 [/] 300 [×] 200 = 200
Correct answer: 600 [×] 400 [/] 800 [-] 300 [+] 200 = 200.
1Which of the following represents the correct sequence for the given pseudo-code? BEGIN [1] READ mark1, mark2, mark3, mark4, mark5 [2] PRINT average [3] total < mark1 + mark2 + mark3 + mark4 + mark5 [4] average < total / 5 [5] DECLARE mark1, mark2, mark3, mark4, mark5, total, average END a. 1 5 4 3 2 b. 5 1 4 3 2 c. 5 1 3 4 2 d. 1 5 3 4 2
Correct answer: 5 1 4 3 2.
Flow chart for adding numbers Is the given flowchart correct?
Correct answer: The symbol for reading input from the user is incorrect.
1Rearrange the pseudo-code for multiplying two given numbers, Choose the correct option from the below. 1 BEGIN 2 result <- number1 * number2 3 PRINT result 4 READ number 1 and number 2 5 DECLARE variables number1, number2, result 6 END a. 1 4 5 2 3 6 b. 1 4 5 3 2 6 c. 1 5 4 3 2 6 d. 1 5 4 2 3 6
Correct answer: 1 5 4 3 2 6.
If there are 6 chocolates and you take away 4, how many do you have?
Correct answer: 4.
What do you infer from this statement? Only if Alvin is happy, then he does not go to work.
Correct answer: Alvin is not happy and he goes to work..
By default, the flow of a program is________
Correct answer: top to bottom.
1Identify the correct pseudo-code logic for checking a number divisible by 5 or 11. a. DECLARE number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF READ number BEGIN b. BEGIN DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF END c. DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END BEGIN d. DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF
Correct answer: BEGIN DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF END.
1Choose the correct options to complete the pseudo-code and determine whether the number is positive, zero, or negative. BEGIN DECLARE number READ number IF _________ PRINT Number is positive IF _________ PRINT Number is zero IF _________ PRINT Number is Negative END IF END a. number>0, number>0, number==0 b. number<0, number>0, number==0 c. number>0, number==0, number<0 d. number>0, number==0, number==0
Correct answer: number>0, number>0, number==0.
Go to statements in the algorithm is
Correct answer: Used to alternate the flow of the program.
______________must be used when a set 5of st2atem2ents4 nee8ds to be executed only if a condition is met.
Correct answer: selection statements.
1Which of the keyword is used to close the IF block, while writing a pseudo-code?
Correct answer: End if.
1READ age IF age>18 THEN PRINT Eligible to vote ENDIF The given pseudo-code snippet is an example for_______
Correct answer: Simple If logic.
When a single if-else logic is used, how many possible choices can be there?
Correct answer: 2.
Decision statements are also called as _______________. a. Sequence logic b. Iteration logic c. Program logic d. Selection logic
Correct answer: Selection logic.
You are returning home from a hotel. On the way, you find a sealed envelope in a street, fully addressed with unused stamps on it. What would you do???
Correct answer: post it at the nearest mail box..
Try some!!! If a doctor gives you 3 pills and tells you5 to ta2ke o2ne p4ill ev8ery half hour, how long would it take before all the pills had been taken?
Correct answer: 1 hour.
Manual execution of the steps in the algorithm is called as _____
Correct answer: Dry run.
Which statement logic implements multiple-way selection?
Correct answer: Else if ladder.
A computer program must either use conditional statements or looping statements or sequential statements to solve a problem. All of them must not appear in the same program. State true/ false.
Correct answer: TRUE.
1Consider the pseudo-code snippet. What output do you think the snippet will produce if the sample input for number is 3? BEGIN DECLARE number READ number IF number>=0 IF number == 0 PRINT Zero ELSE PRINT Three ENDIF PRINT No Value END
Correct answer: Three No value.
Identify the logic which suits the flowchart
Correct answer: Else-if Ladder.
Which of the following is not a keyword used in a pseudo-code
Correct answer: Start.
From the option, find the correct pseudo-code to find the greatest of three numbers
Correct answer: BEGIN DECLARE variables a,b,c READ a,b,c IF a>b IF a>c PRINT a ELSE PRINT c ELSE IF b>c PRINT b ELSE PRINT c END.
Pointing to a photograph of a boy Mathew said, "He is the son of the only son of my mother." How is Mathew related to that boy?
Correct answer: Father.
Analyze the statements. i)Danny is younger than Edwin ii)Christine is younger than Danny. iii)Christine is older than Edwin. If the first two statements are true, the third statement is
Correct answer: False.
Assume, there are four boys sitting on a sofa. Mithran is to the left of Anwar. Babu is to the right of Anwar. Edwin is between Anwar and Babu. Who would be second from the left in the photograph?
Correct answer: Edwin.
1"Invalid balloon number " O5R nu2mber2 > 14 OR 8number < 50 "This balloon can fiy to Tweety" OR number < 1 PRINT AND number%7 == 0 number%3 == 0 number > 50 ELSE "This balloon cannot fiy to Tweety" OR number%7 == 0 END IF You are provided with a partial pseudocode for the below problem statement. Drag and Drop the options provided so that it will be the correct pseudocode. Save Tweety Silvester and Tweety are friends. Bender was one of the Silvester's enemy. One day Silvester and Tweety went on to a trip. Bender planned to kidnap Tweety.. He kidnapped and kept her in one of the hot balloons tied up to a height. There were 50 hot balloons numbered from one. Each balloon will fiy to a certain height. Only the numbers having both 3 and 7 as its factors can fiy upto the height of the Tweety's balloon. Silvester was confused and he didn't know which numbered balloon can fiy to Tweety. (Note: If balloon number is greater than 50, or balloon number less than 1, then it should display invalid balloon number) Eg: Balloon's number: 42 This balloon can fiy to Tweety. Eg: Enter the Balloon's number: 24 This balloon cannot fiy to Tweety. Pseudocode : BEGIN DECLARE variable number READ number IF number > 50 OR number < 1 THEN PRINT "Invalid balloon number " ELSE IF number%3 == 0 AND number%7 == 0 THEN PRINT "This balloon can fiy to Tweety" ELSE PRINT "This balloon cannot fiy to Tweety" END IF END
Correct answer: Save Tweety Silvester and Tweety are friends. Bender was one of the Silvester's enemy. One day Silvester and Tweety went on to a trip. Bender planned to kidnap Tweety.. He kidnapped and kept her in one of the hot balloons tied up to a height. There were 50 hot balloons numbered from on.
1Choose the correct pseudocode for the below problem statement. Problem Statement : Hide and Seek One day, Bunny and his friends were playing hide and seek in the forest. Tom went along to hide. He finds an abandoned bag containing a board(8x8) game in a cave. He gets excited and starts playing the game only to realizes that it's magical. He has three chances to roll the dice. Each turn's outcome will lead into a new surrounding and some would be dangerous. If the outcome of rolling dices is in multiples of 3 then he will be caught in a dangerous phase. Note if any one outcome is multiple of 3, then tom is in danger. (If the outcome of rolling dices is either 0 or less than that you should tell Tom as "Invalid Turn". ) Example : Enter value of turn 1 10 Enter value of turn 2 5 Enter value of turn 3 2 Tom is safe Example : Enter value of turn 1 12 Enter value of turn 2 5 Enter value of turn 3 2 Tom is in danger a. BEGIN DECLARE variables turn1,turn2,turn3 READ turn1, turn2, turn3 IF turn1>0 AND turn2>0 AND turn3>0 THEN IF turn1%3==0 OR turn2%3==0 OR turn3%3==0 THEN PRINT "Tom is in Danger" ELSE PRINT "Tom is Safe" END IF ELSE PRINT "Invalid turn" END IF END b. BEGIN READ turn1, turn2, turn3 DECLARE variables turn1,turn2,turn3 IF turn1>0 AND turn2>0 AND turn3>0 THEN IF turn1%3==0 OR turn2%3==0 OR turn3%3==0 THEN PRINT "Tom is in Danger" ELSE PRINT "Tom is Safe" END IF ELSE PRINT "Invalid turn" END IF END c. BEGIN DECLARE variables turn1,turn2,turn3 READ turn1, turn2, turn3 IF turn1>0 AND turn2>0 AND turn3>0 THEN ELSE PRINT "Tom is Safe" IF turn1%3==0 OR turn2%3==0 OR turn3%3==0 THEN PRINT "Tom is in Danger" END IF ELSE PRINT "Invalid turn" END IF END d. BEGIN DECLARE variables turn1,turn2,turn3 READ turn1, turn2, turn3 PRINT "Tom is in Danger" IF turn1>0 AND turn2>0 AND turn3>0 THEN ELSE PRINT "Tom is Safe" IF turn1%3==0 OR turn2%3==0 OR turn3%3==0 THEN END IF ELSE PRINT "Invalid turn" END IF END
Correct answer: BEGIN DECLARE variables turn1,turn2,turn3 READ turn1, turn2, turn3 IF turn1>0 AND turn2>0 AND turn3>0 THEN IF turn1%3==0 OR turn2%3==0 OR turn3%3==0 THEN PRINT "Tom is in Danger" ELSE PRINT "Tom is Safe" END IF ELSE PRINT "Invalid turn" END IF END.
Which looping logic is exit controlled?
Correct answer: do-while loop.
Consider the output: 0, 2, 4, 6, 8 ,10 ,12, 16 Which of the below given pseudo code snippet gives the above output?
Correct answer: BEGIN DECLARE number, count, even SET count <-- 16, number <-- 0, even <-- 0 WHILE number<count PRINT even SET even <-- even + 2 Number <--5 num2ber+2 1 48 END WHILE PRINT even END.
Predict the output of the given flowchart.
Correct answer: 1 2.
Iteration/looping is a repetition of___________
Looping block can have a single statement or block of statements
Do-while looping statement is almost same as______
Correct answer: While loop.
1What is true about FOR LOOP?
Correct answer: In for loop, the exact number of iterations is known.
Jack wants to book fiight tickets in Feather-Airways online portal for his family of five. Passenger details like name, age, gender etc. should be entered for each member. The same process of getting details continues for all the five members. The above scenario is a good example for which looping statements?
Correct answer: For loop.
1What will be the output for WHILE loop? BEGIN DECLARE number SET number <-- 30 WHILE number>0 number <-- number-4 END WHILE PRINT number END
Correct answer: 2.
1What is the output for FOR-loop snippet? FOR i <--1 to 15 PRINT i i <-- i+3 END FOR
Correct answer: 4 7 10 13.
Which of the following symbols is inappropriate in building the flowchart pertaining to sequential flow of program?
Correct answer: diamond.
The statement / statements within the loop must get executed at least once except for do-while statement. State True/False.
Correct answer: TRUE.
Which of the following statements are true with respect to looping statements?
Initial condition must be applied before the loop begins to execute. The iteration must terminate at some point of time. A looping statement can be nested and can have decision making statements
Which of the following statements are true?
The operand in an expression can be a variable or a constant. Operator without operand is meaningless
Consider you have a Rubik cube with different colors in each face. To solve this cube, you will continue to rotate the sides until you reach same colors in all faces. This is a real time example for which looping statements?
Correct answer: Do-while.
Partially w h r e a i f l g o t m n p d DOWN: 1) Step by step list of instructions 4) When you know the exact number of iterations, this loop is used Across: 2)When a process/set of actions is to be repeated, these statements are used. 3) In looping, Each execution of a statement/block of statements is technically termed as______ 5) This loop statement is also called as exit-controlled loop 1 4 [a] f 2 l o o p i n g [g] r [o] 3 i t e r a t i o n [i] [t] 5 d o w h i l e [m]
Crossword: 1-Down=algorithm, 4-Down=for, 2-Across=looping, 3-Across=iteration, 5-Across=do-while.
Identify the logic which suits the flowchart?
Correct answer: While loop.
1It's Halloween. You go from house to house, tricking or treating. You get 2 candies from each house that you go to. You must return home once you collect 100 candies. Can you arrange the sequence for this loop activity. 1 BEGIN 2 SET candy count <- 0 3 END WHILE 4 DECLARE candy_count 5 WHILE candy_count<=100 6 candy count <- candy_count+2 7 END a. 1 4 2 5 6 3 7 b. 1 2 4 3 6 5 7 c. 1 4 2 3 6 5 7 d. 1 4 5 2 3 6 7
Correct answer: 1 4 2 5 6 3 7.
Looping statements are also called ____________ a. Sequence logic b. Program logic c. Selection logic d. Iteration logic
Correct answer: Iteration logic.
Find out the logic of series and complete. 9 = 4, 21 = 9, 22 = 9, 24 = 10, 8 = 5, 7 = 5, 99 = 10, 100 = 7, 16 = ?
Correct answer: 9 = 4, 21 = 9, 22 = 9, 24 = 10, 8 = 5, 7 = 5, 99 = 10, 100 = 7, 16 = ?.
Take 1 away from me and you get a prime number; add 1 to me and you get twice that prime number.
Correct answer: 3.
1Select the appropriate code snippet for the given problem statement provided as pseudocode. Problem Statement : Strong number Check if a given number is a strong number. 145 is a strong number because 1!+4!+5! = 145. Sample Input : 145 Sample Output : Strong number Code: BEGIN DECLARE variables number, sum, temp, remainder, fact READ number SET sum=0, temp=number __________________ remainder = number % 10 SET fact = 1 FOR i IN 1 to remainder DO fact = fact *i END FOR sum = sum+ fact number = number / 10 END WHILE IF sum==temp THEN PRINT "Strong number" ELSE PRINT "Not a Strong number" END IF END a. WHILE number <= 0 b. WHILE number != 0 c. WHILE number < 0 d. WHILE number == 0
Correct answer: WHILE number <= 0.
1Choose the pseudocode for the below problem statement. Problem Statement : Vehicle Registration Mr.William buys a new Audi car. During the vehicle registration, he desires a fancy number in such a way that both the number and its reverse are the same. Generate an algorithm to find that fancy number. Sample Input : 1221 Sample Output : Number is Fancy a. BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END b. BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO number = number/10 rem = number%10 reverse = reverse*10 + rem END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END c. BEGIN DECLARE variables number, reverse, rem, temp READ number WHILE number !=0 DO SET reverse = 0, temp = number rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END d. BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Not Fancy" ELSE PRINT "Number is Fancy" END IF END
Correct answer: BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END.
A mathematical quiz context happened in a school and the scores are stored in an array named quizmark. The coordinating person wants to copy the quiz score into another array named copyquizmark. Which of these options will do that?
Correct answer: FOR index <- 0 to n copyquizmark[index] <- quizmark[index] index <- index+1 END FOR.
1Assume, number[100] <- 99. How many elements can be stored inside the array variable number?
Correct answer: The statement gives no clue about the number of elements that can be stored.
Which of the following are False with respect to the manipulation of arrays?
An array can store homogeneous data. Elements of array are stored in contiguous locations and it is not possible to increase the array size
Negative elements can be placed inside an array. State true / false
Arrays can store negative integer values; the index must be non-negative, but element values can be negative.
The names of all associates undergoing training are stored in an array named associate_name[50]. The 5th associates name is retrieved as
since array index starts from 0, the fifth element is accessed is accessed by array[4]. It is possible to perform arithmetic operation in an array position
Information about ___________ need not be specified when declaring an array
Correct answer: the elements to be stored in the array.
It is not possible to do a search operation in an array that is not sorted. State True/False.
Unsorted arrays can still be searched using linear search.
Random access is not possible in an array. State True/False
Random access is possible in an array using an index.
Assume you have an array5 nam2ed n2umb4ers 8of size 10. Which of the assignment is valid?
array index starts from 0 to 9, for 10 elements. Assigning values to numbers[10],numbers[11] is not valid, since the index exceeds the size of array resulting in unpredictable results
Which of the following statements is correct with respect to arrays?
Correct answer: Elements in an array are arranged in ascending order by default.
Consider you buy a laptop. You want to store5 the 2deta2ils o4f tha8t laptop such as price, model_name,model_number, warranty_period into a single array named details[10]. Is ths possible?
Correct answer: No.
Consider you want to compare the prices of redmi , sony, samsung phones in three online sites like amazon,fiipkart,ebay. Which array type is best suitable to do this comparision?
Correct answer: two-dimensional arrays.
It is possible to traverse through an array from the first position to the last and not vice versa. State true or false.
Correct answer: State true or fals.
An Array consists of rows and columns is also called as________
Correct answer: Two-dimensional array.
1Choose the correct Pseudo code to store names in an array and display a name. a. BEGIN INPUT name DECLARE name [20] PRINT name END b. BEGIN INPUT name DECLARE name [20] END PRINT name c. BEGIN DECLARE name [20] INPUT name PRINT name END d. BEGIN INPUT name PRINT name DECLARE name [20] END
Correct answer: BEGIN DECLARE name [20] INPUT name PRINT name END.
A farmer has 17 sheep and all but nine die. How many are left?
Correct answer: 9.
a year, there are 12 months. Seven months have 31 days. How many months have 28 days?
Correct answer: 12.
What is the next letter in the following sequence? J,F, M, A, M, J, J, A, __.
Correct answer: O.
1Select the appropriate code snippet for the given problem statement provided as pseudocode. Problem Statement : Dinner Plan Five friends plan to go out for dinner. They plan to order equal number of dishes. Each row specifies individual cost. Find the total amount each person needs to pay. Assume the values for this matrix for 3 dishes are 12 23 18 45 32 60 42 39 23 54 42 60 25 84 30 The output will be Amount to be paid by person 1 is 53 Amount to be paid by person 2 is 137 Amount to be paid by person 3 is 104 Amount to be paid by person 4 is 156 Amount to be paid by person 3 is 139 Explanation : Output is the sum of each row Code: BEGIN DECLARE variable arr[5][20], n, sum=0 ___________________ FOR j IN 0 to n-1 DO READ arr[i][j] END FOR END FOR FOR i IN 0 TO 4 DO SET sum = 0 FOR j IN 0 TO n-1 DO sum = sum + arr[i][j] END FOR PRINT "Amount to be paid by person "+(i+1)+" is "+sum END FOR END a. FOR i IN 0 to 5 DO b. FOR i IN 0 to n DO c. FOR i IN 0 to 4 DO d. FOR i IN 0 to 3 DO
Correct answer: FOR i IN 0 to 5 DO.
1Choose the correct pseudocode for the below problem statement. Problem Statement : Find Maximum value Choose a pseudo code to find the maximum values in each row of a matrix. Assume it is a 3x3 matrix. Explanation : Matrix will be with index (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) Assume the values for this matrix are 12 23 18 45 32 60 42 39 23 The output will be Max value in row 1 is 23 Max value in row 2 is 60 Max value in row 3 is 42 a. BEGIN DECLARE variable arr[3][3] FOR i IN 0 to 2 DO FOR j IN 0 to 2 DO READ arr[i][j] END FOR END FOR SET max = arr[i][0] FOR i IN 0 TO 2 DO FOR j IN 0 TO 2 DO IF arr[i][j]>max THEN max = arr[i][j] END IF END FOR PRINT "Max value in row "+(i+1)+" is "+max END FOR END b. BEGIN DECLARE variable arr[3][3] FOR i IN 0 to 2 DO FOR j IN 0 to 2 DO END FOR END FOR FOR i IN 0 TO 2 DO READ arr[i][j] SET max = arr[i][0] FOR j IN 0 TO 2 DO IF arr[i][j]>max THEN max = arr[i][j] END IF END FOR PRINT "Max value in row "+(i+1)+" is "+max END FOR END c. BEGIN DECLARE variable arr[3][3] FOR i IN 0 to 2 DO FOR j IN 0 to 2 DO READ arr[i][j] END FOR END FOR FOR i IN 0 TO 2 DO SET max = arr[i][0] FOR j IN 0 TO 2 DO IF arr[i][j]>max THEN max = arr[i][j] END IF END FOR PRINT "Max value in row "+(i+1)+" is "+max END FOR END d. BEGIN DECLARE variable arr[3][3] FOR i IN 0 to 2 DO FOR j IN 0 to 2 DO READ arr[i][j] END FOR END FOR FOR i IN 0 TO 2 DO SET max = arr[i][0] FOR j IN 0 TO 2 DO IF arr[i][j]>max THEN max = arr[i][j] END IF END FOR END FOR PRINT "Max value in row "+(i+1)+" is "+max END
Correct answer: BEGIN DECLARE variable arr[3][3] FOR i IN 0 to 2 DO FOR j IN 0 to 2 DO READ arr[i][j] END FOR END FOR FOR i IN 0 TO 2 DO SET max = arr[i][0] FOR j IN 0 TO 2 DO IF arr[i][j]>max THEN max = arr[i][j] END IF END FOR PRINT "Max value in row "+(i+1)+" is "+max END FOR END.
Which conforms that the software meets its technical specifications?
Correct answer: Verification.
The software is put into operation in the clients environment. The client comes back to enhance the UI to attract more customers. This phase is called as _______________
Correct answer: Maintenance.
Which of the below is one of the phase of the prototype model? a. Detailed HLD phase b. Detailed Coding c. Quick design d. Extensive testing
Correct answer: Quick design.
High-risk or major functions are addressed in the first cycles there by delivering an operational product. Which of the SDLC process models achieves this?
Correct answer: Incremental model.
Beta technologies has undertaken a collision avoidance system software to be implemented for airports. Additional safety measures have to be automated by warning pilots when another aircraft gets closer, otherwise impacts are huge. Which of the following SDLC process models best suits the requirement?
Correct answer: Spiral model.
The student mark processing system software has been developed and deployed at the St. Peters university. The system shows the grade as 0 for all the students rather than the actual grade. Which phase below was not done properly during the SDLC?
Correct answer: Software Testing.
Choose the option that accurately represents the sequential order of phases in the Waterfall model. a. Requirement Gathering, Analysis, Design, Testing, Implementation, Deployment, Maintenance b. Requirement Gathering, Analysis, Design, Implementation, Testing, Maintenance, Deployment c. Analysis, Requirement Gathering5, Des2ign,2 Imp4leme8ntation, Testing, Deployment, Maintenance d. Requirement Gathering, Analysis, Design, Implementation, Testing, Deployment, Maintenance
Correct answer: Requirement Gathering, Analysis, Design, Testing, Implementation, Deployment, Maintenance; Analysis, Requirement Gathering5, Des2ign,2 Imp4leme8ntation, Testing, Deployment, Maintenance.
Scenario: LIC has manually carried out their process of premium collection procedure for the past 45 years. Now, they have employed the services of another company to automate the above. Question: Which of the following models would you suggest to the outsource company?
Correct answer: Waterfall model.
Testing performed by the user to ensure that the system meets the agreed upon quality attributes and the specification is called as.
Correct answer: Acceptance testing.
Which model emphasizes Validation and Verification at each level of stage containment?
Correct answer: V-Model.
Consider that you have to develop a fiight control system. The system is simulated as such that the original system is working. There are many potential hazards with such a system. What model would you suggest to develop the system?
Correct answer: Spiral model.
ABC company comes to the Allen Software Company with various requirement. The client wants the functionality to view all the employee profile, view salary information of the employee and view the leave details.Once each functionality is completed the module will be delivered to the client. Which would be the right model for this scenario
Correct answer: Incremental model.
A client wants to develop a Web application for the new Super market store. The client want to have lot of UI components and customers will have lot of interactions with the UI. What model is best suited
Correct answer: Prototype.
________ involves tranformation of user needs into an effective software solution.
Correct answer: Software development process.
Spiral life cycle model is not suitable for products that are vulnerable to large number of risks. State if True or False.
Correct answer: FALSE.
When there is a difference between the output what is expected and the actual one is termed as
Correct answer: Defect.
XYZ Finance Co. has, at present, started its operations in India. Based on the first six months performance, it has plans for expansion across five countries. They want to automate their operations at this stage. What is the process model that the developer should choose to adopt?
Correct answer: Based on the first six months performance, it has plans for expansion across five countries. They want to automate their operations at this stag.
Which of the following options are the steps involved in Requirements Analysis?
Requirements Gathering phase is followed by the Analysis of the gathered requirements
From the below options, identify the role of the system analyst. a. Writes pseudo code for the given module b. Creates SRS c. Creates HLD document d. Creates high level test cases
Correct answer: Creates SRS.
Identify the correct statements from the below options. a. Analysis or High level design or Low level design can be performed in any order b. Analysis is performed followed by High level design and then Low level design c. High level design, Low level design followed by Analysis is performed. d. Analysis is performed followed by low level design and then high level design
Correct answer: Analysis is performed followed by High level design and then Low level design.
Identify the type of design that helps in transforming the data model created during requirements analysis phase into the data structures that will be used to implement the software
Correct answer: Data Design.
A lady buys goods worth Rs.200 from a shop. (shopkeeper is selling the goods with zero profit). The lady gives him Rs.1000 note. The shopkeeper gets the change from the next shop and keeps Rs.200 for himself and returns Rs.800 to the lady. Later the shopkeeper of the next shop comes with the Rs.1000 note saying duplicate and takes his money back. How much LOSS did the shopkeeper face?
Correct answer: The shopkeeper gets the change from the next shop and keeps Rs.200 for himself and returns Rs.800 to the lady. Later the shopkeeper of the next shop comes with the Rs.1000 note saying duplicate and takes his money back. How much LOSS did the shopkeeper face?.
You are in a race and overtake the person who is in second place. What place are you now in?
Correct answer: Second.
What does come down but never goes up? _______ What can one catch that is not thrown? _______ What goes up and down, but always remains in the same place? _______ what word that changes a girl into a woman? _______ Choose the correct answer: a. Cold, Rain, Stairs, Age b. Rain, Cold, Stairs, Age c. Age, Rain, Stairs, Cold d. Stairs, Cold, Stairs, Age
Correct answer: Cold, Rain, Stairs, Age; Rain, Cold, Stairs, Age; Stairs, Cold, Stairs, Age.
Identify the possible entities from the given option
Correct answer: Customer; Sale.
What kind of non functional requirement best suit the below scenario: Whenever the new offers are published in the online shopping site, an sms has to be sent to all the registered customers within 10 minutes of publishing
Correct answer: Performance Requirement.
Consider the below scenario. A team has many players and the player belongs to one team. Identify the cardinality between player and team
Correct answer: M:1.
Whenever a new product is arrived, the stock needs to be updated. This requirement is an example for non functional requirement. State true or False
Correct answer: FALSE.
Which of the following are available in SRS Document?
Correct answer: Non Functional Requirements; Constraints; Functional Requirements.
During which phase the following activities are performed: Identifying the major modules of the system, how these modules integrate, the architecture of the system and describing pseudo code for each of the identified module
Correct answer: Design.
_______ describes how the development activities will be performed and how development phases follow each other.
Correct answer: Software Development Process.
Requirement came to Allen Software company to develop a software for military purpose. . second delay in the missile launching software would create greater loss to the human life. What kind of model is best suited for this scenario?
Correct answer: Spiral model.
Aesthetics of the website is part of the functional requirement. State true or false
Correct answer: FALSE.
_________ is the application of a systematic, disciplined, quantifiable approach to the design, development, operation and maintenance of software.
Correct answer: Software Engineering.
Identify this technique of dynamic testing where, For a range of input, three values are chosen, One value above the range, One value below the range, and One value within the range
Correct answer: Equivalence partitioning.
What is the difference between the actual ou5tput2 of a2 soft4ware8 and the correct output?
Correct answer: Error.
What is the type of testing in which the tester will know about the input and the expected output details based on the specification document only but no knowledge on implementation?
Correct answer: Black Box Testing.
Identify the correct phases of software testing life cycle. a. Requirements Analysis,Test Preparation,Test Case development,Test Environment Set up,Test Execution,Test Cycle closure b. Requirements Analysis,Test Case development,Test Preparation,Test Environment Set up,Test Execution,Test Cycle closure c. Requirements Analysis,Test Preparation,Test Case development,Test Execution,Test Environment Set up,Test Cycle closure d. Requirements Analysis,Test Preparation,Test Case development,Test Environment Set up,Test Cycle closure,Test Execution
Correct answer: Requirements Analysis,Test Preparation,Test Case development,Test Environment Set up,Test Execution,Test Cycle closure.
Which all of the following options would basis path testing perform?
Every statement(Statement coverage) Every predicate (condition) in the code(branch coverage) Loops (loop coverage)
Determine the cyclomatic complexity for the following code: Accept year if(year mod 4=0 and year mod 100!=0) or(year mod 400 =0) print year is leap else print year is not leap end if.
Correct answer: 4.
After implementation of Library management system, the tester identified that certain logic are redundantly rewritten by the developers, and the coding standards are violated in few modules. What type of testing is carried out to identify these errors?
Correct answer: Static Testing.
Boundary value analysis can only be used during white-box testing. State if True or False.
Correct answer: FALSE.
The testing technique that deals with the internal logic and structure of the code is called ________.
Correct answer: WhiteBox Testing.
the online shopping portal, for customer registration the password field can accept only characters in the range of 5 to 25. Derive test cases using Boundary value analysis
Correct answer: 5,25,4,26.
Tester is trying to test whether the values in the drop down are listed properly. What type of testing the tester performs in this scenario?
Correct answer: Black box testing.
Walk through is performed by the trained moderator, whereas the Inspection is usually conducted by the author itself to record defects and deviations
Walk-through is led by the author; Inspection is conducted by a trained moderator.
An SRS has the following requirement.The stock exchange shall show the stock report for the next 24 hours.What is the issue with this requirement
Correct answer: Ambiguous.
The standard document that describes all the requirements of the system is called as
Correct answer: Software Requirement Specification.
Client Comes to Allen Company for a Banking Solution. Who from the below options would be best suited to gather all the requirements correctly from the client
Correct answer: System analyst.
remote control Car application, in the step by step execution of the requirement described, it is mentioned when the fuel level goes below the minimum level, the application should indicate the user in red color. In the output section of the same process it is mentioned that the indicator will glow pink. What is the kind of requirement specified in SRS?
Correct answer: Contradicting.
Client Comes to Allen Company for a Banking Solution.Which phase of SDLC is best suited to gather what is expected from client
Correct answer: Requirement analysis.
A good SRS should be ______, ________ and _______.
A good SRS should be complete, consistent and traceable
Which of the following options are valid for the relationship between the configuration objects?
A curved arrow indicates a compositional relation. A double-headed straight arrow indicates an interrelationship.
Match the following facts about Version Management.
Version management uses file locking for serialized changes, branches for isolated work, and backups/history for rollback to previous versions.
Version Control allows users to lock files so they can only be edited by one person at a time and track changes to files
Version control systems allow locking files to prevent concurrent edits and track file history.
Choose the missing steps involved in the Change Control Process in the correct order: 1. Identify and submit change request 2. ____________ 3. Plan the change 4. Implement and test the change 5. Verify implementation of change fi. Close change request a. Collect impacts of change request b. Evaluate impacts of change request c. Review stakeholder feedback d. Analyze the cost of the proposed change
Correct answer: Evaluate impacts of change request.
Which of the following describes the change history of an object?
Correct answer: Evolution graph.
Version Management allows parallel concurrent development. State True or False.
Correct answer: True.
From the options identify the features that are part of the software configuration management
Correct answer: Synchronisation control; Version management; Concurrency control.
State true or false. Automated tools are available in the market, for managing change and versioning the software
Correct answer: TRUE.
_________ is a committee that makes decisions regarding whether or not proposed changes to a software project can be incorporated.
Correct answer: Change Control Board.
an online shopping application, during customer registration the customer was made to enter his city in a text box. As the site became popular for online shopping, the client came back to include autocomplete feature in the city field to improve user friendliness. What maintenance needs to be carried out in this scenario?
Correct answer: Perfective.
Software maintenance, changes are implemented by modifying existing components and adding new components to the system. State if True or False.
Correct answer: TRUE.
Software maintenance for the change of the platform is an example for --------- maintenance
Correct answer: Adaptive.
Client has developed an application that allows each of their customers to store 2TB of data. As the number of Customers are increasing client feels the storage space has to be increased for smooth operations to its customers. What type of maintanence is this?
Correct answer: Preventive Maintanence.
Any changes done to the software during the operational phase of the software before project wind up is called as maintenance. State if True or False.
Maintenance refers to changes made after deployment; changes before project wind-up during operation qualify.
Client wanted to add a new feature to his existing application "Discount Offers" for all the existing customers. Whenever a new product comes to the supermarket, their customer's should be intimated with the week day offer. What kind of maintenance is this?
Correct answer: Perfective Maintanence.
Y2K problem is an example for ------------- maintenance
Correct answer: Preventive.
A mathematical quiz context happened in a school and the scores are stored in an array named quizmark. The coordinating person wants to copy the quiz score into another array named copyquizmark. Which of these options will do that?
Correct answer: FOR index <- 0 to n copyquizmark[index] <- quizmark[index] END FOR.
1Assume, number[100] <- 99. How many elements can be stored inside the array variable number?
Correct answer: The statement gives no clue about the number of elements that can be stored.
Which of the following are False with respect to the manipulation of arrays?
An array can store homogeneous data. Elements of array are stored in contiguous locations and it is not possible to increase the array size
Negative elements can be placed inside an array. State true / false
Arrays can store negative values; the index must be non-negative but element values can be any valid type including negatives.
The names of all associates undergoing training are stored in an array named associate_name[50]. The 5th associates name is retrieved as
since array index starts from 0, the fifth element is accessed is accessed by array[4]. It is possible to perform arithmetic operation in an array position
Informationabout neednotbespecifiedwhendeclaringanarray Information about ___________ need not be specified when declaring an array
Correct answer: the elements to be stored in the array.
It is not possible to do a search operation in an array that is not sorted. State True/False.
Unsorted arrays can be searched with linear search.
Random access is not possible in an array. State True/False
Arrays support random access via index.
Assume you have an array named numbers of size 10. Which of the assignment is valid?
array index starts from 0 to 9, for 10 elements. Assigning values to numbers[10],numbers[11] is not valid, since the index exceeds the size of array resulting in unpredictable results
Which of the following statements is correct with respect to arrays?
Correct answer: Elements in an array are arranged in descending order by default.
Consider you buy a laptop. You want to store the details of that laptop such as price, model_name,model_number, warranty_period into a single array named details[10]. Is ths possible?
Correct answer: No.
Consider you want to compare the prices of redmi , sony, samsung phones in three online sites like amazon,flipkart,ebay. Which array type is best suitable to do this comparision?
Correct answer: two-dimensional arrays.
It is possible to traverse through an array from the first position to the last and not vice versa. State true or false.
Arrays can be traversed both forward and backward using loops.
An Array consists of rows and columns is also called as________
Correct answer: Two-dimensional array.
1Choose the correct Pseudo code to store names in an array and display a name. a. BEGIN INPUT name PRINT name DECLARE name [20] END b. BEGIN INPUT name DECLARE name [20] PRINT name END c. BEGIN DECLARE name [20] INPUT name PRINT name END d. BEGIN INPUT name DECLARE name [20] END PRINT name
Correct answer: BEGIN DECLARE name [20] INPUT name PRINT name END.
the Waterfall model, requirements are typically…
Waterfall assumes stable, upfront requirements with minimal changes later.
Which model maps each development phase to a corresponding test phase?
V-Model (Verification & Validation) pairs dev phases with testing activities.
Prototyping (throwaway) is BEST when…
Throwaway prototypes help elicit unclear requirements, then are discarded.
Evolutionary Prototyping means…
In evolutionary prototyping, the working model is continuously refined into the final product.
Which model emphasizes delivering functionality in modules over time?
Incremental delivers the product in functional slices (increments).
Iterative development primarily focuses on…
Iterative = repeated cycles that improve the same product.
Which model is most associated with explicit risk analysis every iteration?
Spiral combines iteration with risk-driven planning and prototyping.
Agile (Scrum) sprints typically deliver…
Agile prioritizes frequent, working software and collaboration.
RAD prioritizes…
RAD favors speed via component reuse, prototyping, and close user input.
V-Model is most suitable for…
V-Model ensures early test planning and traceability for critical systems.
Agile, the product backlog is owned by the…
The Product Owner prioritizes the backlog based on value.
A key drawback of Waterfall is…
Waterfall feedback often arrives after coding/testing, making changes costly.
Incremental vs Iterative: which is TRUE?
Incremental = breadth by modules; Iterative = depth over cycles.
Which model is LEAST flexible to change?
Waterfall resists change because phases are linear and locked.
Spiral is best matched with which keyword?
Spiral is explicitly risk-driven.
Agile accepts changing requirements…
Agile principle: welcome change for the customer’s competitive advantage.
RAD typically targets a delivery window of…
RAD emphasizes quick turnarounds with time-boxed construction.
Throwaway prototyping’s prototype is…
It is a learning tool, not the basis of the final codebase.
A hallmark of Scrum is…
Scrum uses ceremonies and cadences for predictable delivery.
Which model best ensures traceability from requirements to tests?
V-Model’s verification & validation mapping enforces traceability.
When primary risk is misunderstood requirements, prefer…
Prototyping reduces misunderstanding through concrete visuals.
Incremental delivery provides value because…
Early increments provide immediate utility and feedback.
Spiral model phases typically include…
Each loop includes planning, risk analysis, engineering, and evaluation.
Kanban emphasizes…
Kanban improves flow by WIP limits and visual boards.
Agile, who shields the team from impediments?
Scrum Master facilitates and removes impediments.
A weakness of RAD is…
RAD depends on intensive user involvement; without it, quality suffers.
Which is MOST documentation-heavy?
Traditional models emphasize documents and stage gates.
Which combo is valid?
Many teams deliver new modules (incremental) while refining existing ones (iterative).
When frequent regulatory audits are expected, which model helps?
Strict documentation and traceability aid audits.
A key Agile artifact used during Sprint Planning is…
Sprint Planning selects items from the Product Backlog to form the Sprint Backlog.
RAD differs from Spiral mainly because RAD…
Spiral is risk-centric; RAD is speed and user-collab centric.
Scrum, increment must be…
Definition of Done ensures quality and usability.
Which model best fits “measure–learn–build” loops?
Lean Startup thinking aligns with iterative/agile loops.
The main risk Spiral addresses early is…
Risk identification/mitigation governs each spiral.
Which statement about Evolutionary Prototyping is TRUE?
Evolutionary prototypes are the seed of the final product.
A new fintech startup will expand to multiple countries; requirements will evolve rapidly. Which model?
Start minimal and evolve with changing regulations/needs.
Client demands a quick MVP in 2 months with heavy user workshops. Pick:
RAD suits fast builds using reusable components and active users.
HR system to be delivered module-by-module: Profiles → Payroll → Leave. Choose:
Each increment adds a distinct functional slice.
Medical device software with strict verification & traceability:
V-Model maps verification/validation rigorously.
E-commerce UI unclear; stakeholders need to “see it” first. Best approach:
Use disposable UI prototypes to clarify flows.
Defense project: high technical risks; must mitigate early. Choose:
Spiral’s risk loops de-risk early.
Start-up wants frequent releases and can adapt scope every 2 weeks. Choose:
Sprints allow frequent reprioritization.
Legacy rewrite with clear, frozen requirements signed by regulators. Choose:
Stable scope fits Waterfall.
Search engine product: release v1 simple, v2 add filters, v3 add ML ranking. Choose:
Same product improved each cycle → Iterative.
Banking back-end core with extreme reliability + audits. Choose:
Regulated, risk-prone systems fit V-Model/Spiral.
Client needs a wizard-like UI clarified before build, backend is standard. Choose:
Prototype clarifies UI; then deliver modules.
Global payroll system delivered by country packs, one-by-one. Choose:
Each country is an increment.
Gaming app MVP in 8 weeks with user playtests every weekend. Choose:
Fast cycles + user feedback fit RAD/Agile.
Highly experimental R&D UI concept needs validation, not production code. Choose:
Discardable prototypes validate ideas cheaply.
A product will start small and grow with market learning; same codebase matures.
Start small; evolve continuously.
Airport ATC training portal with strict test evidence + mapping to requirements.
Traceability and planned validation are key.
Customer support tool where each month a new module (chat, KB, analytics) is added.
Module-wise staged delivery.
Critical avionics system with many unknown technical risks.
Risk-centric loops suit avionics.
Regulated insurance portal; UI unclear now but must pass audits later.
Prototype clarifies UI; V-Model ensures audit-ready traceability.
Startup insists on weekly demos and can reprioritize constantly.
Frequent change demands Agile cadence.
Campus ERP with clear, frozen SRS and fixed budget/time.
Stable scope favors Waterfall predictability.
Social app: same app gets richer each release (recs, stories, live).
Add new features (increments) and improve existing ones (iterations).
Back-office tool needed super-fast using ready-made components and forms builder.
RAD thrives on component reuse and speed.
Client wants to see a working UI every 2 weeks and decides scope on the go.
Time-boxed sprints with reviews fit best.
Safety-critical railway signaling with exhaustive validation mapping.
V-Model provides the required verification/validation rigor.
Which looping logic is exit controlled?
Correct answer: While loop.
Consider the output: 0, 2, 4, 6, 8 ,10 ,12, 16 Which of the below given pseudo code snippet gives the above output?
Correct answer: BEGIN DECLARE number, count, even SET count <-- 8, number <-- 0, even <-- 0 WHILE number<count PRINT even SET even <-- even + 2 Number <-- number+ 2 END WHILE END.
Predict the output of the given flowchart.
Correct answer: 1 2.
Iteration/looping is a repetition of___________
Looping block can have a single statement or block of statements
Do-while looping statement is almost same as______
Correct answer: While loop.
1What is true about FOR LOOP?
Correct answer: In for loop, the exact number of iterations is known.
Jack wants to book flight tickets in Feather-Airways online portal for his family of five. Passenger details like name, age, gender etc. should be entered for each member. The same process of getting details continues for all the five members. The above scenario is a good example for which looping statements?
Correct answer: For loop.
1What will be the output for WHILE loop? BEGIN DECLARE number SET number <-- 30 WHILE number>0 number <-- number-4 END WHILE PRINT number END
Correct answer: -2.
1What is the output for FOR-loop snippet? FOR i <--1 to 15 PRINT i i <-- i+3 END FOR
Correct answer: 1 4 7 10 13.
Which of the following symbols is inappropriate in building the flowchart pertaining to sequential flow of program?
Correct answer: diamond.
The statement / statements within the loop must get executed at least once except for do-while statement. State True/False.
Correct answer: TRUE.
Which of the following statements are true with respect to looping statements?
Initial condition must be applied before the loop begins to execute. The iteration must terminate at some point of time. A looping statement can be nested and can have decision making statements
Which of the following statements are true?
The operand in an expression can be a variable or a constant. Operator without operand is meaningless You have correctly selected 1.
Consider you have a Rubik cube with different colors in each face. To solve this cube, you will continue to rotate the sides until you reach same colors in all faces. This is a real time example for which looping statements?
Correct answer: Do-while.
d f a o n w h g r l e t m p i DOWN: 1) Step by step list of instructions 4) When you know the exact number of iterations, this loop is used Across: 2)Whenaprocess/setofactionsistoberepeated thesestatementsareused 2)When a process/set of actions is to be repeated, these statements are used. 3) In looping, Each execution of a statement/block of statements is technically termed as______ 5) This loop statement is also called as exit-controlled loop 1 4 a f 2 l o o p i n g g r o 3 i t e r a t i o n i t 5 d o w h i l e m
Crossword solution: 1-Down=algorithm, 4-Down=for, 2-Across=looping, 3-Across=iteration, 5-Across=do-while.
Identify the logic which suits the flowchart?
Correct answer: While loop.
1It's Halloween. You go from house to house, tricking or treating. You get 2 candies from each house that you go to. You must return home once you collect 100 candies. Can you arrange the sequence for this loop activity. 1 BEGIN 2 SET candy count <- 0 3 END WHILE 4 DECLARE candy_count 5 WHILE candy_count<=100 6 candy count <- candy_count+2 7 END a. 1 2 4 3 6 5 7 b. 1 4 2 5 6 3 7 c. 1 4 2 3 6 5 7 d. 1 4 5 2 3 6 7
Correct answer: 1 4 2 5 6 3 7.
Looping statements are also called ____________ a. Program logic b. Iteration logic c. Selection logic d. Sequence logic
Correct answer: Iteration logic.
1Select the appropriate code snippet for the given problem statement provided as pseudocode. Problem Statement : Strong number Check if a given number is a strong number. 145 is a strong number because 1!+4!+5! = 145. Sample Input : 145 Sample Output : Strong number Code: BEGIN DECLARE variables number, sum, temp, remainder, fact READ number SET sum=0, temp=number __________________ remainder = number % 10 SET fact = 1 FOR i IN 1 to remainder DO fact = fact *i END FOR sum = sum+ fact number = number / 10 END WHILE IF sum==temp THEN PRINT "Strong number" ELSE PRINT "Not a Strong number" END IF END a. WHILE number == 0 b. WHILE number < 0 c. WHILE number != 0 d. WHILE number <= 0
Correct answer: WHILE number == 0.
1Choose the pseudocode for the below problem statement. Problem Statement : Vehicle Registration Mr.William buys a new Audi car. During the vehicle registration, he desires a fancy number in such a way that both the number and its reverse are the same. Generate an algorithm to find that fancy number. Sample Input : 1221 Sample Output : Number is Fancy a. BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO number = number/10 rem = number%10 reverse = reverse*10 + rem END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END b. BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Not Fancy" ELSE PRINT "Number is Fancy" END IF END c. BEGIN DECLARE variables number, reverse, rem, temp READ number WHILE number !=0 DO SET reverse = 0, temp = number rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END d. BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO rem = number%10 reverse = reverse*10 + rem number = number/10 END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END
Correct answer: BEGIN DECLARE variables number, reverse, rem, temp READ number SET reverse = 0, temp = number WHILE number !=0 DO number = number/10 rem = number%10 reverse = reverse*10 + rem END WHILE IF temp == reverse THEN PRINT "Number is Fancy" ELSE PRINT "Number is Not Fancy" END IF END.
______________must be used when a set of statements needs to be executed only if a condition is met.
Correct answer: selection statements.
1Consider the pseudo-code snippet. What output do you think the snippet will produce if the sample input for number is 3? BEGIN DECLARE number READ number IF number>=0 IF number == 0 PRINT Zero ELSE PRINT Three ENDIF PRINT No Value END
Correct answer: Zero Three Three No value.
From the option, find the correct pseudo-code to find the greatest of three numbers
Correct answer: BEGIN DECLARE variables a,b,c READ a,b,c IF a>c PRINT a ELSE PRINT c ELSE IF b>c PRINT b ELSE PRINT c END.
1READ age IF age>18 THEN PRINT Eligible to vote ENDIF The given pseudo-code snippet is an example for_______
Correct answer: Simple If logic.
By default, the flow of a program is________
Correct answer: top to bottom.
If there are 6 chocolates and you take away 4, how many do you have?
Correct answer: 4.
What do you infer from this statement? Only if Alvin is happy, then he does not go to work.
Correct answer: If Alvin is not happy, he goes to work..
Go to statements in the algorithm is
Correct answer: Used to alternate the flow of the program.
Identify the logic which suits the flowchart
Correct answer: Else-if Ladder.
Try some!!! If a doctor gives you 3 pills and tells you to take one pill every half hour, how long would it take before all the pills had been taken?
Correct answer: 1 hour.
Which statement logic implements multiple-way selection?
Correct answer: Else if ladder.
Manual execution of the steps in the algorithm is called as _____
Correct answer: Dry run.
When a single if-else logic is used, how many possible choices can be there?
Correct answer: 2.
You are returning home from a hotel. On the way, you find a sealed envelope in a street, fully addressed with unused stamps on it. What would you do???
Correct answer: post it at the nearest mail box..
Which of the following is not a keyword used in a pseudo-code
Correct answer: Start.
1Choose the correct options to complete the pseudo-code and determine whether the number is positive, zero, or negative. BEGIN DECLARE number READ number IF _________ PRINT Number is positive IF _________ PRINT Number is zero IF _________ PRINT Number is Negative END IF END a. number>0, number==0, number==0 b. number<0, number>0, number==0 c. number>0, number>0, number==0 d. number>0, number==0, number<0
Correct answer: number>0, number==0, number==0.
Decision statements are also called as _______________. a. Selection logic b. Iteration logic c. Program logic d. Sequence logic
Correct answer: Selection logic.
A computer program must either use conditional statements or looping statements or sequential statements to solve a problem. All of them must not appear in the same program. State true/ false.
Correct answer: TRUE.
1Identify the correct pseudo-code logic for checking a number divisible by 5 or 11. a. DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINTnumbernotdivisibleby5or11 PRINT number not divisible by 5 or 11 END BEGIN b. DECLARE number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF READ number BEGIN c. BEGIN DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF END d. DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF
Correct answer: BEGIN DECLARE number READ number IF number%5==0 THEN PRINT number divisible by 5 ELSE IF number%11==0 THEN PRINT number divisible by 11 ELSE PRINT number not divisible by 5 or 11 END IF END.
1Which of the keyword is used to close the IF block, while writing a pseudo-code?
Correct answer: End if.
Based on our question bank analysis, master these concepts to score high in Software Engineering.
"Focus on understanding the logic behind pseudocode loops and selection statements, as they form the bulk of technical assessments."