Multiple Programming Languages Quiz

Test your knowledge across multiple programming languages including PL/SQL, SQL, C++, ABAP, and COBOL

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

IN WHICH OF THE FOLLOWING VERSIONS OF COBOL, THE USE OF GO TO STATEMENT HAS BEEN ELIMINATED FROM COBOL STANDARDS?

  1. COBOL-68
  2. COBOL-74
  3. COBOL-85
  4. COBOL-9x
Question 2 Multiple Choice (Single Answer)

The settings in the Data Browser/Table View Maintenance field...

  1. Regulate the transport of the table's data records during installs, upgrades, copies
  2. Regulate the scope that you may use to display and maintain data records
  3. Answers A & B
  4. None of the above
Question 3 Multiple Choice (Single Answer)

What are the two elementary data types provided for character strings in ABAP?

  1. a and b
  2. x and y
  3. p and f
  4. c and n
Question 4 Multiple Choice (Single Answer)

Which data type cannot be used to define parameters

  1. Type N
  2. Type C
  3. Type F
  4. Type P
Question 5 Multiple Choice (Single Answer)

Which statement will cause a syntax check error?

  1. Constants:x(3) type c value '123'.
  2. Data:x(3) type c.
  3. Constants:x(3) type c.
  4. Data:x(3) type c value '123'.
Question 6 Multiple Choice (Single Answer)

What is the effect when a clear statement is used on an internal table without header line?

  1. All the lines of the table are deleted
  2. The work area is initialized
  3. All the lines of the table are initialized
  4. Nothing
Question 7 Multiple Choice (Single Answer)

Examine the following PL/SQL block of code: ... DELETE FROM orders WHERE pay_stat = ‘Overdue’; IF SQL%ROWCOUNT > 5 THEN RAISE out_of_bounds; END IF; ... What value is returned after the statement is run and the DELETE statement returned no rows?

  1. 0
  2. 1
  3. 5
  4. true
  5. false
Question 8 Multiple Choice (Single Answer)

You run the following SQL statement: SQL> SELECT lname, deptid, sal, bonus FROM emp WHERE sal, bonus IN (SELECT sal, bonus FROM emp WHERE deptid=20); The statement resulted in an error. Which line is causing the error?

  1. sql>
  2. from emp
  3. WHERE sal, bonus IN
  4. WHERE deptid=20);
Question 9 Multiple Choice (Single Answer)

What must be included within a cursor when the WHERE CURRENT OF clause is used in PL/SQL?

  1. DELETE clause
  2. UPDATE clause
  3. ROWID pseudocolumn
  4. FOR UPDATE clause
Question 10 Multiple Choice (Single Answer)

What can be implemented to reuse a cursor definition in PL/SQL?

  1. Cursor FOR loop
  2. FETCH statement
  3. %ISOPEN attribute
  4. Parameters
Question 11 Multiple Choice (Single Answer)

What command can you use to test a named PL/SQL block for compilation?

  1. ANALYZE_SCHEMA
  2. CREATE OR REPLACE
  3. SHOW ERRORS
  4. FORMAT_ERROR_STACK
Question 12 True/False

In CPP program if the function is defined in the same program file before it is called, a separate prototype is required.

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

Which of the following is an error in calling the function? void func( int i = 5, double d = 1.234 );

  1. func( 9, 5.67 )
  2. func( 4 )
  3. func()
  4. func( ,4 )
Question 14 Multiple Choice (Single Answer)

Which of the following can be used to modify the value of a variable?

  1. Pointer
  2. References
  3. Both
  4. None of the above
Question 15 Multiple Choice (Single Answer)

Public inheritance signifies__________ relation ship

  1. for a
  2. is a
  3. with a
  4. has a
Question 16 True/False

A const pointer cannot be assigned to an ordinary pointer.

  1. True
  2. False
Question 17 Multiple Choice (Multiple Answers)

Carl, a database user, creates and executes the following SQL statement: CREATE SYNONYM employee FOR stanley.employee; What statements below are true?

  1. Only Carl can access the EMPLOYEE synonym.
  2. The EMPLOYEE synonym is a public synonym.
  3. The synonym name cannot be the same as the object name.
  4. Stanley can access the EMPLOYEE synonym.
  5. The synonym can be accessed remotely.
  6. The EMPLOYEE synonym is a private synonym.
Question 18 Multiple Choice (Multiple Answers)

Which of the following SQL statements will not execute successfully? (Choose all that apply)

  1. SELECT lname, jobid, sal, sal+500 FROM emp;
  2. SELECT lname, jobid, sal FROM emp (sal + 500);
  3. SELECT lname, jobid, sal, sal + 500 “Bonus” FROM emp;
  4. SELECT lname, jobid, sal, sal + 500 bonus FROM emp
  5. SELECT lname || to_char(sal+500) “Employee Bonus” FROM emp;
  6. SELECT lname, sal + 500 Employee Bonus FROM emp;
Question 19 Multiple Choice (Multiple Answers)

You run the following SQL statement: SELECT a.lname, a.location, b.dname, b.hiredate FROM emp a, emp b WHERE a.empid=b.empid; Which options are correct? (Choose all that apply)

  1. This is an equijoin.
  2. This is a self join.
  3. Line 2 will return an error.
  4. Line 3 will return an error.
  5. The statement will execute successfully.
Question 20 Multiple Choice (Multiple Answers)

You create the following PL/SQL block: DECLARE var1 CONSTANT NUMBER := 50; var2 NUMBER := 0; BEGIN SELECT acctno INTO var2 FROM bank_acct WHERE name = 'JORDAN'; var1 :=var2 + 2000; END; Which of the following lines in this block of PL/SQL code will produce an error?

  1. var2 NUMBER := 0;
  2. INTO var2
  3. WHERE name = 'JORDAN';
  4. var1 :=var2 + 2000;
  5. There are no errors in this PL/SQL block