- Type
- Quiz
- Course
- CS405 Database Programming using Oracle 11g
- Size
- PDF 846 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
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 :
Correct answer: Iteration # 1 Iteration # 2 Iteration # 4 Iteration # 5
Q2. What is the initial value of index for a reverse for loop?
Correct answer: UPPER bound
Q3. Label appear at the ________ of the LOOP statement.
Correct answer: beginning
Q4. PL/SQL Loops are also known as
Correct answer: Iterative Control Statements
Q5. The counter in PL/SQL FOR Loop is by default incremented by _____________.
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 :
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.
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 :
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.
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?
Correct answer: i
Related CS405 files
All CS405 files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.