IT Fundamentals: C Programming, UNIX, and SQL/Oracle
A comprehensive test covering C/C++ programming concepts, UNIX commands and file systems, and SQL/Oracle database operations including DDL commands, constraints, and functions.
Questions
Which of the following conversion characters is used to display strings characters in the output statement?
- '%d'
- '%f'
- '%c'
- '%s'
Which of the following sorting algorithms works by partitioning the array to be sorted and each partition is in turn sorted recursively?
- Selection sort
- Bubble sort
- Quick sort
- None of these
Which of the following performs sorting on the secondary memory?
- Internal sorting
- External sorting
- Insertion sorting
- None of these
Which of the following commands in UNIX is used to write first 'N' numbers of lines to the screen?
- Head command
- Rmdir command
- Banner command
- Who command
Which of the following is a valid identifier?
- DATA-REC
- _DS
- 29CLCT
- My.File
Which of the following files in UNIX contain the list of file names and the associated information?
- Ordinary files
- Directory files
- Special files
- FIFO files
Which of the following pairs is correctly matched?
- tellg - iostream.h
- write - iomanip.h
- atoi - math.h
- powlo - stdio.h
In UNIX, which of the following is used with ls command to list entries by columns?
- Is-F
- ls-C
- Is-R
- None of these
Which of the following is a valid real constant in exponent form?
- 172.E5
- 1.7E
- 0.17E2.3
- -0.172E-3
Which of the following is NOT a derived data type?
- Array
- Function
- Double
- Reference
Which symbol is used for operators to perform token replacement and merging during the preprocessor scanning phase?
- * (Asterisk)
- # (Hash sign)
- ## (Double hash sign)
- ... (Ellipses)
Which of the following is a DDL command?
- INSERT
- TRUNCATE
- UPDATE
- DELETE
Which of the following are true?
i. TRUNCATE command is used to remove all the rows in a given table without rollback.
ii. TRUNCATE command is used to drop the table.
iii. DELETE command is used to remove all the rows in a given table with rollback.
iv. DELETE command is used to remove all the rows in a given table without rollback.
- Only i and iii
- Only ii and iii
- Only i and iv
- Only ii and iv
Which keyword is used to get the timezone of the database?
- Timezone
- Timezonedb
- Dbtimezone
- Dbtz
Which of the following statements is correct about UNIQUE key in Oracle?
- Two rows for a given column having UNIQUE key can have same values
- Two rows for a given column having UNIQUE key can have nulls
- Both option 1 and option 2 are correct.
- Neither option 1 nor option 2 is correct.
What is the output of the below query?
select rowid from dual
- 0
- 1
- AAAABBAAAAOhAAA
- AAAAB0AABAAAAOhAAA
Which of the following is true?
i. A primary key by default checks for not null and uniqueness conditions.
ii. A primary key by default checks only for uniqueness.
iii. A primary key can be a composite key.
iv. A primary key can never be a composite key.
- i. and iv. are true
- i. and iii. are true
- ii. and iv. are true
- ii. and iii. are true
Which function is used to convert a number to a string?
-
TONUMBER -
TO_NUMBER -
TOCHAR -
TO_CHAR
Which of the following array declarations is valid?
- float a[+40]
- int num[1-10]
- double[50]
- float values[10]
Which command is used to disable the Primary Key constraint?
-
ALTER CONSTRAINTcommand -
ALTER TABLE command -
ALTER COLUMN command -
ALTER QUERY command
Which of the following statements is true?
i. For enabling primary key constraint, ALTER TABLE is used.
ii. For enabling primary key constraint, ENABLE keyword is used all alone.
iii. For disabling primary key, index will be dropped.
iv. For disabling primary key, index will not be dropped.
-
i. and iii. are true -
i. and iv. are true -
ii. and iii. are true -
ii. and iv. are true
Which of the following increments the time component of the sysdate by one second?
-
SELECT SYSDATE+1 FROM DUAL -
SELECT TO_CHAR(SYSDATE+1,'MM/dd/yyyy HH:mm:ss') FROM DUAL -
SELECT SYSDATE+1/86400 FROM DUAL -
SELECT (SYSDATE+1)/86400 FROM DUAL
Which of the following is not an unary operator in C?
- &&
- !
- sizeof
- ~
Which of the following statement is true regarding the code fragment given below?
#include<time.h>
#include<stdio.h>
void main()
{
int a,b,c;
for(a=0;a<=3;a++)
{
delay(5000);
printf(I);
delay(3000);
printf(am);
delay(2000);
printf(the best);
}
getch();
}
- Total time of execution will be 10 milli seconds.
- The total time of execution will be 10 seconds.
- Total time of execution will be 40 seconds.
- None of the above
Which of the following statements is correct about the program given below?
#include<stdio.h>
void main()
{
int i=0;
i++'</stdio.h>
If(i<=3)
{
printf(“I am the best”);
exit();main();
}
}
- <span style="font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times" new="">The program prints 'I am the best' three times.
- <span style="font-size:11.0pt;line-height:115%;font-family:Calibri,sans-serif;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Times" new="">The program prints 'I am the best' infinite times.
- <span style="font-size:11.0pt;line-height:115%;font-family:Calibri,sans-serif;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Times" new="">The program prints 'I am the best' only once.
- <span style="font-size:11.0pt;line-height:115%;font-family:Calibri,sans-serif;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:Times" new="">The compiler reports an error since main() cannot call itself.