0
Alien head

programming languages Online Quiz - 65

Description: programming languages Online Quiz - 65
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Which statement is true regarding the INTERSECT operator?

  1. It ignores NULL values

  2. Reversing the order of the intersected tables alters the result.

  3. The names of columns in all SELECT statements must be identical.

  4. The number of columns and data types must be identical for all SELECT statements in the


Correct Option: D

Which two statements are true regarding views?

  1. A subquery that defines a view cannot include the GROUP BY clause

  2. A view is created with the subquery having the DISTINCT keyword can be updated

  3. A view that is created with the subquery having the pseudo column ROWNUM keyword cannot be updated

  4. A Data Manipulation Language (DML) operation can be performed on a view that is created with the subquery having all the NOT NULL columns of a table


Correct Option: C,D

Which two statements are true regarding working with dates?

  1. The default internal storage of dates is in the numeric format

  2. The default internal storage of dates is in the character format

  3. The RR date format automatically calculates the century from the SYSDATE function and does not allow the user to enter the century

  4. The RR date format automatically calculates the century from the SYSDATE function but allows the user to enter the century if required


Correct Option: A,B

You need to display the date ll-oct-2007 in words as "Eleventh of October, Two Thousand Seven'. Which SQL statement would give the required result?

  1. SELECT TO_CHAR('ll-oct-2007'. 'miDdspth "of Month. Year') FROM DUAL:

  2. SELECT TO_CHAR(TO_DATE('ll-oct-2007'X 'miDdspth of month, year') FROM DUAL;

  3. SELECT TO_CHAR(TO_DATE('ll-oct-2007'). 'miDdthsp "of* Month. Year') FROM DUAL;

  4. SELECT TO_DATE(TO_CHAR('ll-oct-20077fiiiDdspth "of" Month. Year')) FROM DUAL:


Correct Option: C

Which three statements are true regarding subqueries?

  1. Subqueries can contain GROUP BY and ORDER BY clauses

  2. Main query and subquery can get data from different tables

  3. Main query and subquery must get data from the same tables

  4. Subqueries can contain ORDER BY but not the GROUP BY clause

  5. Only one column or expression can be compared between the main query and subqeury

  6. Multiple columns or expressions can be compared between the main query and subquery


Correct Option: A,B,F

Which arithmetic operations can be performed on a column by using a SQL function that is built into Oracle database?

  1. addition

  2. subtraction

  3. raising to a power

  4. finding the quotient

  5. finding the lowest value


Correct Option: A,C,E

Which three statements/commands would cause a transaction to end?

  1. COMMIT

  2. SELECT

  3. CREATE

  4. ROLLBACK

  5. SAVEPOINT


Correct Option: A,C,D

Which three statements are true about multiple-row subqueries?

  1. They can contain a subquery within a subquery.

  2. They can return multiple columns as well as rows.

  3. They cannot contain a subquery within a subquery.

  4. They can return only one column but multiple rows.

  5. They can contain group functions and GROUP BY and HAVING clauses.

  6. They can contain group functions and the GROUP BY clause, but not the HAVING clause.


Correct Option: A,B,E

Which two statements are true about sequences created in a single instance database?

  1. The numbers generated by a sequence can be used only for one table

  2. DELETE would remove a sequence from the database

  3. CURRVAL is used to refer to the last sequence number that has been generated

  4. When the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement


Correct Option: C,D

Which two statements are true regarding the USING clause in table joins?

  1. It can be used to join a maximum of three tables

  2. It can be used to restrict the number of columns used in a NATURAL join

  3. It can be used to access data from tables through equijoins as well as nonequijoins

  4. It can be used to join tables that have columns with the same name and compatible data types


Correct Option: B,D

C++ uses pointers. Choose the one which is not TRUE about C Sharp.

  1. Pointers are not supported in C#

  2. Pointers are supported in C# as is in C++

  3. Pointers are replaced by delegates

  4. Pointers can be used by declaring unsafe blocks


Correct Option: D

namespace keyword in C# and C++ refers to

  1. namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is used to define templates

  2. namespace in C# and C++ are for same purpose

  3. namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is used to define STL classes

  4. namespace in C# refers to a holder where name collisions can be avoided whereas in C++ it is undefined.


Correct Option: B

FILE *fp=_tfopen("c:\test.txt","rws"); this code is equivalent to in C#

  1. FileStream fp= new FileStream("c:\test.txt", FileMode.Create, FileAccess.Write,FileShare.Read);

  2. FileStream fp= new FileStream("c:\test.txt", "rws");

  3. FileStream fp= new FileStream("c:\test.txt", FileMode.ReadWriteShared);

  4. FileStream fp= new FileStream("c:\test.txt", FileMode.ReadWrite, FileAccess.Shared);


Correct Option: A

_tcscat(str1, str2) function in C++ is similar to this in C Sharp.

  1. strcat(str1,str2)

  2. str1.Append(str2)

  3. str1.CopyAtEnd(str2)

  4. str1=str1+str2


Correct Option: D

What is delegate in C++?

  1. Functions

  2. Templates

  3. Function pointers

  4. Pointer of pointers


Correct Option: C

The print( ) method is just like println( ), except that it does not output a newline character after each call.

  1. True

  2. False


Correct Option: A

The simplest form of the for loop in Java is for(initialization; condition; iteration) statement;

  1. True

  2. False


Correct Option: A

All statements in Java end with a _____________.

  1. Colon

  2. SemiColon

  3. Hypen

  4. Dot


Correct Option: B

There are _____ types of Comments in Java.

  1. One

  2. Two

  3. Three

  4. Four


Correct Option: C

Java enables the creation of cross-platform programs by compiling into an intermediate representation called Java ____________.

  1. Byte Code

  2. Firewall

  3. Class Code

  4. Bit Code


Correct Option: A
+ View questions