Multiple Programming Languages Quiz
Test your knowledge across multiple programming languages including PL/SQL, SQL, C++, ABAP, and COBOL
Questions
IN WHICH OF THE FOLLOWING VERSIONS OF COBOL, THE USE OF GO TO STATEMENT HAS BEEN ELIMINATED FROM COBOL STANDARDS?
- COBOL-68
- COBOL-74
- COBOL-85
- COBOL-9x
The settings in the Data Browser/Table View Maintenance field...
- Regulate the transport of the table's data records during installs, upgrades, copies
- Regulate the scope that you may use to display and maintain data records
- Answers A & B
- None of the above
What are the two elementary data types provided for character strings in ABAP?
- a and b
- x and y
- p and f
- c and n
Which data type cannot be used to define parameters
- Type N
- Type C
- Type F
- Type P
Which statement will cause a syntax check error?
- Constants:x(3) type c value '123'.
- Data:x(3) type c.
- Constants:x(3) type c.
- Data:x(3) type c value '123'.
What is the effect when a clear statement is used on an internal table without header line?
- All the lines of the table are deleted
- The work area is initialized
- All the lines of the table are initialized
- Nothing
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?
- 0
- 1
- 5
- true
- false
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?
- sql>
- from emp
- WHERE sal, bonus IN
- WHERE deptid=20);
What must be included within a cursor when the WHERE CURRENT OF clause is used in PL/SQL?
- DELETE clause
- UPDATE clause
- ROWID pseudocolumn
- FOR UPDATE clause
What can be implemented to reuse a cursor definition in PL/SQL?
- Cursor FOR loop
- FETCH statement
- %ISOPEN attribute
- Parameters
What command can you use to test a named PL/SQL block for compilation?
- ANALYZE_SCHEMA
- CREATE OR REPLACE
- SHOW ERRORS
- FORMAT_ERROR_STACK
In CPP program if the function is defined in the same program file before it is called, a separate prototype is required.
- True
- False
Which of the following is an error in calling the function? void func( int i = 5, double d = 1.234 );
- func( 9, 5.67 )
- func( 4 )
- func()
- func( ,4 )
Which of the following can be used to modify the value of a variable?
- Pointer
- References
- Both
- None of the above
Public inheritance signifies__________ relation ship
- for a
- is a
- with a
- has a
A const pointer cannot be assigned to an ordinary pointer.
- True
- False
Carl, a database user, creates and executes the following SQL statement: CREATE SYNONYM employee FOR stanley.employee; What statements below are true?
- Only Carl can access the EMPLOYEE synonym.
- The EMPLOYEE synonym is a public synonym.
- The synonym name cannot be the same as the object name.
- Stanley can access the EMPLOYEE synonym.
- The synonym can be accessed remotely.
- The EMPLOYEE synonym is a private synonym.
Which of the following SQL statements will not execute successfully? (Choose all that apply)
- SELECT lname, jobid, sal, sal+500 FROM emp;
- SELECT lname, jobid, sal FROM emp (sal + 500);
- SELECT lname, jobid, sal, sal + 500 “Bonus” FROM emp;
- SELECT lname, jobid, sal, sal + 500 bonus FROM emp
- SELECT lname || to_char(sal+500) “Employee Bonus” FROM emp;
- SELECT lname, sal + 500 Employee Bonus FROM emp;
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)
- This is an equijoin.
- This is a self join.
- Line 2 will return an error.
- Line 3 will return an error.
- The statement will execute successfully.
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?
- var2 NUMBER := 0;
- INTO var2
- WHERE name = 'JORDAN';
- var1 :=var2 + 2000;
- There are no errors in this PL/SQL block