Oracle SQL Functions Quiz

Test your knowledge of Oracle SQL built-in functions including mathematical, string, and date functions

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond?

  1. The first argument passed into the program
  2. You can't define main like that
  3. The program name
  4. Null value
Question 2 Multiple Choice (Single Answer)

What is the last index number in an array of 100 chars?

  1. 99
  2. 100
  3. 101
  4. 100.0
Question 3 Multiple Choice (Single Answer)

What header file is needed for the function exit()?

  1. conio.h
  2. dos.h
  3. stdio.h
  4. stdlib.h
Question 4 Multiple Choice (Single Answer)

SELECT ABS(-15) "Absolute" FROM DUAL;

  1. -15
  2. 15
  3. 16
  4. 14
Question 5 Multiple Choice (Single Answer)

SELECT CEIL(15.7) "Ceiling" FROM DUAL;

  1. 16
  2. 15
  3. 14
  4. -15
Question 6 Multiple Choice (Single Answer)

SELECT FLOOR(15.7) "Floor" FROM DUAL;

  1. 16
  2. -15
  3. 14
  4. 15
Question 7 Multiple Choice (Single Answer)

SELECT REPLACE('JACK and JUE','J','BL')FROM DUAL;

  1. jack and jue
  2. JACK and JUE
  3. ACK and UE
  4. BLACK and BLUE
Question 8 Multiple Choice (Single Answer)

SELECT MONTHS_BETWEEN TO_DATE('02-01-1995','MM-DD-YYYY'),TO_DATE('01-01-1995','MM-DD-YYYY') ) FROM DUAL;

  1. -1
  2. 0
  3. 1
  4. 2
Question 9 Multiple Choice (Single Answer)

SELECT POWER(3,2) FROM DUAL;

  1. 8
  2. 9
  3. 6
  4. -6
Question 10 Multiple Choice (Single Answer)

SELECT TO_CHAR( ADD_MONTHS(to_date('07-JUN-1994,'DD-MON-YYYY'),1), 'DD-MON-YYYY') FROM employees WHERE last_name = 'Baer';

  1. 06-JUN-1994
  2. 07-JUL-1994
  3. 06-JUL-1994
  4. 06-JUN-1995
Question 11 Multiple Choice (Single Answer)

SELECT SIN(30 * 3.14159265359/180) FROM DUAL;

  1. 1
  2. 0.866
  3. 0.5
  4. 0
Question 12 Multiple Choice (Single Answer)

SELECT MOD(11,4)FROM DUAL;

  1. 3
  2. 4
  3. 1
  4. 2
Question 13 Multiple Choice (Single Answer)

SELECT SQRT(25) FROM DUAL;

  1. 5
  2. 25
  3. 50
  4. 0
Question 14 Multiple Choice (Single Answer)

SELECT LENGTHB ('CANDIDE') FROM DUAL;

  1. 14
  2. 10
  3. 4
  4. 7
Question 15 True/False

int i=3, j=4; if( i==3 || j++ ) { printf("%d\n",j); } This will print: 5

  1. True
  2. False
Question 16 True/False

It is possible to call a macro recursively.

  1. True
  2. False
Question 17 True/False

We can portably use the fflush(stdin); statement to clear the remaining characters in input stream.

  1. True
  2. False
Question 18 True/False

conio.h is an ANSI standard header file.

  1. True
  2. False
Question 19 True/False

conio.h is an ANSI standard header file.

  1. True
  2. False
Question 20 True/False

In declaration of function parameters, int a[5] is equivalent to int *a.

  1. True
  2. False