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.

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following conversion characters is used to display strings characters in the output statement?

  1. '%d'
  2. '%f'
  3. '%c'
  4. '%s'
Question 2 Multiple Choice (Single Answer)

Which of the following sorting algorithms works by partitioning the array to be sorted and each partition is in turn sorted recursively?

  1. Selection sort
  2. Bubble sort
  3. Quick sort
  4. None of these
Question 3 Multiple Choice (Single Answer)

Which of the following performs sorting on the secondary memory?

  1. Internal sorting
  2. External sorting
  3. Insertion sorting
  4. None of these
Question 4 Multiple Choice (Single Answer)

Which of the following commands in UNIX is used to write first 'N' numbers of lines to the screen?

  1. Head command
  2. Rmdir command
  3. Banner command
  4. Who command
Question 5 Multiple Choice (Single Answer)

Which of the following is a valid identifier?

  1. DATA-REC
  2. _DS
  3. 29CLCT
  4. My.File
Question 6 Multiple Choice (Single Answer)

Which of the following files in UNIX contain the list of file names and the associated information?

  1. Ordinary files
  2. Directory files
  3. Special files
  4. FIFO files
Question 7 Multiple Choice (Single Answer)

Which of the following pairs is correctly matched?

  1. tellg - iostream.h
  2. write - iomanip.h
  3. atoi - math.h
  4. powlo - stdio.h
Question 8 Multiple Choice (Single Answer)

In UNIX, which of the following is used with ls command to list entries by columns?

  1. Is-F
  2. ls-C
  3. Is-R
  4. None of these
Question 9 Multiple Choice (Single Answer)

Which of the following is a valid real constant in exponent form?

  1. 172.E5
  2. 1.7E
  3. 0.17E2.3
  4. -0.172E-3
Question 10 Multiple Choice (Single Answer)

Which of the following is NOT a derived data type?

  1. Array
  2. Function
  3. Double
  4. Reference
Question 11 Multiple Choice (Single Answer)

Which symbol is used for operators to perform token replacement and merging during the preprocessor scanning phase?

  1. * (Asterisk)
  2. # (Hash sign)
  3. ## (Double hash sign)
  4. ... (Ellipses)
Question 12 Multiple Choice (Single Answer)

Which of the following is a DDL command?

  1. INSERT
  2. TRUNCATE
  3. UPDATE
  4. DELETE
Question 13 Multiple Choice (Single Answer)

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.

  1. Only i and iii
  2. Only ii and iii
  3. Only i and iv
  4. Only ii and iv
Question 14 Multiple Choice (Single Answer)

Which keyword is used to get the timezone of the database?

  1. Timezone
  2. Timezonedb
  3. Dbtimezone
  4. Dbtz
Question 15 Multiple Choice (Single Answer)

Which of the following statements is correct about UNIQUE key in Oracle?

  1. Two rows for a given column having UNIQUE key can have same values
  2. Two rows for a given column having UNIQUE key can have nulls
  3. Both option 1 and option 2 are correct.
  4. Neither option 1 nor option 2 is correct.
Question 16 Multiple Choice (Single Answer)

What is the output of the below query?

select rowid from dual

  1. 0
  2. 1
  3. AAAABBAAAAOhAAA
  4. AAAAB0AABAAAAOhAAA
Question 17 Multiple Choice (Single Answer)

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.

  1. i. and iv. are true
  2. i. and iii. are true
  3. ii. and iv. are true
  4. ii. and iii. are true
Question 18 Multiple Choice (Single Answer)

Which function is used to convert a number to a string?


  1. TONUMBER

  2. TO_NUMBER

  3. TOCHAR

  4. TO_CHAR
Question 19 Multiple Choice (Single Answer)

Which of the following array declarations is valid?

  1. float a[+40]
  2. int num[1-10]
  3. double[50]
  4. float values[10]
Question 20 Multiple Choice (Single Answer)

Which command is used to disable the Primary Key constraint?


  1. ALTER CONSTRAINTcommand

  2. ALTER TABLE command

  3. ALTER COLUMN command

  4. ALTER QUERY command
Question 21 Multiple Choice (Single Answer)

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.


  1. i. and iii. are true

  2. i. and iv. are true

  3. ii. and iii. are true

  4. ii. and iv. are true
Question 22 Multiple Choice (Single Answer)

Which of the following increments the time component of the sysdate by one second?


  1. SELECT SYSDATE+1 FROM DUAL

  2. SELECT TO_CHAR(SYSDATE+1,'MM/dd/yyyy HH:mm:ss') FROM DUAL

  3. SELECT SYSDATE+1/86400 FROM DUAL

  4. SELECT (SYSDATE+1)/86400 FROM DUAL
Question 23 Multiple Choice (Single Answer)

Which of the following is not an unary operator in C?

  1. &&
  2. !
  3. sizeof
  4. ~
Question 24 Multiple Choice (Single Answer)

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();
}

  1. Total time of execution will be 10 milli seconds.
  2. The total time of execution will be 10 seconds.
  3. Total time of execution will be 40 seconds.
  4. None of the above
Question 25 Multiple Choice (Single Answer)

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();
}
}

  1. <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.
  2. <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.
  3. <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.
  4. <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.