Skip to content
VUBuddy

CS405 Quiz 3

Database Programming using Oracle 11g PDF 846 KBUpdated 23 Oct 2026
Quiz CS405 Quiz 3 PDF 846 KB
vubuddy.com
Type
Quiz
Course
CS405 Database Programming using Oracle 11g
Size
PDF 846 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 846 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2 of 2. Download the file for all 2 pages.

Q1. BEGIN FOR i IN 1 .. 5 LOOP IF i = 3 THEN CONTINUE; END IF; DBMS_OUTPUT.PUT_LINE('Iteration # ' || i); END LOOP; END; Output for this piece of code :

  1. Iteration # 2 Iteration # 4 Iteration # 5
  2. Iteration # 1 Iteration # 4 Iteration # 5
  3. Iteration # 1 Iteration # 2 Iteration # 5
  4. Iteration # 1 Iteration # 2 Iteration # 4 Iteration # 5

Correct answer: Iteration # 1 Iteration # 2 Iteration # 4 Iteration # 5

Q2. What is the initial value of index for a reverse for loop?

  1. Lower bound
  2. Upper bound-Lower bound/2
  3. 1
  4. UPPER bound

Correct answer: UPPER bound

Q3. Label appear at the ________ of the LOOP statement.

  1. anywhere
  2. beginning
  3. end
  4. Cannot say

Correct answer: beginning

Q4. PL/SQL Loops are also known as

  1. Iterative Control Statements
  2. Iterative Case Statements
  3. Indentation Control Statements
  4. Indentation Case Statements

Correct answer: Iterative Control Statements

Q5. The counter in PL/SQL FOR Loop is by default incremented by _____________.

  1. 0
  2. 2
  3. 1
  4. NULL

Correct answer: 1

Q6. BEGIN FOR l_index IN 1 .. 10 LOOP CONTINUE WHEN MOD (l_index, 2) = 0; DBMS_OUTPUT.PUT_LINE ('Loop index = ' || TO_CHAR (l_index)); END LOOP; END; / Output for this piece of code :

  1. Loop index = 1
  2. Loop index = 1 Loop index = 3 Loop index = 5 Loop index = 7 Loop index = 9
  3. Loop index = 5 Loop index = 7 Loop index = 9
  4. Loop index = 1 Loop index = 3

Correct answer: Loop index = 1 Loop index = 3 Loop index = 5 Loop index = 7 Loop index = 9

Q7. Sequence of statements is enclosed between the LOOP and the END LOOP statements.

  1. TRUE
  2. FALSE
  3. Can be true or false
  4. Cannot say

Correct answer: TRUE

Q8. DECLARE no NUMBER := 0; BEGIN FOR no IN 1 .. 5 LOOP DBMS_OUTPUT.PUT_LINE('Iteration : ' || no); CONTINUE WHEN no = 4 DBMS_OUTPUT.PUT_LINE('CONTINUE WHEN EXECUTE Iteration : ' || no); END LOOP; END; / Output for this piece of code :

  1. Iteration # 1 Iteration # 3 CONTINUE WHEN EXECUTE Iteration: 4 Iteration # 5
  2. Iteration # 1 Iteration # 2 Iteration # 3
  3. Iteration # 1 Iteration # 2 Iteration # 3 CONTINUE WHEN EXECUTE Iteration: 4
  4. Iteration # 1 Iteration # 2 Iteration # 3 CONTINUE WHEN EXECUTE Iteration: 4 Iteration # 5

Correct answer: Iteration # 1 Iteration # 2 Iteration # 3 CONTINUE WHEN EXECUTE Iteration: 4 Iteration # 5

Q9. Program will run indefinitely and will result in abnormal termination.

  1. If there is no exit condition written
  2. Condition is wrong
  3. If variable is defined more than one time
  4. Loop is not written

Correct answer: If there is no exit condition written

Q10. FOR i IN 1..tbl_roast.COUNT LOOP lv_tot_num := lv_tot_num + tbl_roast(i); END LOOP; In the above code fragment, which of the following holds the value of the current iteration number?

  1. lv_tot_num
  2. tbl_roast
  3. i
  4. COUNT

Correct answer: i

All CS405 files →
CS405 Database Programming using Oracle 11g All CS405 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.