Oracle SQL Functions Quiz
Test your knowledge of Oracle SQL built-in functions including mathematical, string, and date functions
Questions
In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond?
- The first argument passed into the program
- You can't define main like that
- The program name
- Null value
What is the last index number in an array of 100 chars?
- 99
- 100
- 101
- 100.0
What header file is needed for the function exit()?
- conio.h
- dos.h
- stdio.h
- stdlib.h
SELECT ABS(-15) "Absolute" FROM DUAL;
- -15
- 15
- 16
- 14
SELECT CEIL(15.7) "Ceiling" FROM DUAL;
- 16
- 15
- 14
- -15
SELECT FLOOR(15.7) "Floor" FROM DUAL;
- 16
- -15
- 14
- 15
SELECT REPLACE('JACK and JUE','J','BL')FROM DUAL;
- jack and jue
- JACK and JUE
- ACK and UE
- BLACK and BLUE
SELECT MONTHS_BETWEEN TO_DATE('02-01-1995','MM-DD-YYYY'),TO_DATE('01-01-1995','MM-DD-YYYY') ) FROM DUAL;
- -1
- 0
- 1
- 2
SELECT POWER(3,2) FROM DUAL;
- 8
- 9
- 6
- -6
SELECT TO_CHAR( ADD_MONTHS(to_date('07-JUN-1994,'DD-MON-YYYY'),1), 'DD-MON-YYYY') FROM employees WHERE last_name = 'Baer';
- 06-JUN-1994
- 07-JUL-1994
- 06-JUL-1994
- 06-JUN-1995
SELECT SIN(30 * 3.14159265359/180) FROM DUAL;
- 1
- 0.866
- 0.5
- 0
SELECT MOD(11,4)FROM DUAL;
- 3
- 4
- 1
- 2
SELECT SQRT(25) FROM DUAL;
- 5
- 25
- 50
- 0
SELECT LENGTHB ('CANDIDE') FROM DUAL;
- 14
- 10
- 4
- 7
int i=3, j=4; if( i==3 || j++ ) { printf("%d\n",j); } This will print: 5
- True
- False
It is possible to call a macro recursively.
- True
- False
We can portably use the fflush(stdin); statement to clear the remaining characters in input stream.
- True
- False
conio.h is an ANSI standard header file.
- True
- False
conio.h is an ANSI standard header file.
- True
- False
In declaration of function parameters, int a[5] is equivalent to int *a.
- True
- False