0

Information Technology

Description: MCQs on Computer Languages
Number of Questions: 20
Created by:
Tags: IT Java/Oracle /C/C++
Attempted 0/20 Correct 0 Score 0

Which is the best example of ternary operator if 'a' is an integer variable?

  1. (a == 1) ? 20: 30

  2. (a = 1) ? 20: 30

  3. (a == 1) > 20: 30

  4. (a* == 1) ? 20: 30

  5. None of these


Correct Option: A
Explanation:

It is similar to if else. In this code the if the value is equal to 1 than the condition is satisfied and 20 will be output else 30.

Which are the three standard file names accessed by any C program?

  1. Standard input file, standard output file, standard error file

  2. Stdin, stdout, stderr

  3. Keywords, mouse, stderr

  4. Registry, Lib, Monitor

  5. None of these


Correct Option: B
Explanation:

These three file pointers are automatically defined when a program executes and provide access to the keyboard and screen.

What is the name of '&&' and '||' operators?

  1. Arithmetic operators

  2. Assignment operators

  3. Logical operators

  4. Relational operators

  5. Unary operators


Correct Option: C
Explanation:

It provides operators such as &&, || etc........

Which are the single character input/output functions in C language?

  1. scanf( ) and printf( )

  2. getchar( ) and printf( )

  3. scanf( ) and putchar( )

  4. getchar( ) and putchar( )

  5. get() and put()


Correct Option: D
Explanation:

Both the system defined functions are used for single character input and output respectively.

Which of the following is the first RDBMS used commercially?

  1. DB2

  2. My SQL

  3. MS SQL

  4. ORACLE

  5. MSSQL 2005


Correct Option: D
Explanation:

In 1978 oracle version 1 in assembly language as RDBMS launched.

Which of the following is a valid keyword in Java?

  1. Float

  2. Interface

  3. String

  4. Unsigned

  5. None of these


Correct Option: B
Explanation:

An interface in the Java programming language is an abstract type that is used to specify an interface (in the generic sense of the term) that classes must implement.

Java is derived from which programming language?

  1. COBOL

  2. PERL

  3. C

  4. Oak

  5. BASIC


Correct Option: D
Explanation:

Java is derived from Oak programming language.

Which is the best option in context with Java program?

  1. Fastest of all

  2. Platform independent

  3. Platform dependent

  4. Limited

  5. Not scalable


Correct Option: B
Explanation:

Java is platform independet and that runs on multiple platforms with little or no modification of code.

Which of the following is true in the context with Java programming language?

  1. Efficient and faster than C

  2. Insecurity of data

  3. Not robust

  4. Object-oriented and interpreted

  5. None of these


Correct Option: D
Explanation:

Java is objected-oriented and interpreted programing language that is the strong feature of java.

Which of the following is not a Java primitive type?

  1. Byte

  2. Float

  3. Character

  4. Long double

  5. None of these


Correct Option: D
Explanation:

It is not a java primitive.

Which is the best suited option in context with OOP features in Java programing language?

  1. High vulnerability

  2. Increasing productivity

  3. Non reusability

  4. Increasing maintenance cost

  5. None of these


Correct Option: B
Explanation:

Object Oriented Programing increases productivity by giving reusability of the codes. It means that the code generated once can be used multiple times appliying  Object Oriented Programing concepts.

From which class are all the other classes derived in Java?

  1. java.lang.Class

  2. java.util.Name

  3. java.lang.Object

  4. java.awt.Window

  5. java.dll.obj


Correct Option: C
Explanation:

The java.lang.Object class is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.

What are inner classes in Java?

  1. Nested classes

  2. Anonymous classes

  3. Sub classes

  4. Derived classes

  5. Lower classes


Correct Option: A
Explanation:

The Java programming language allows one to define a class within another class. Such an inner class is called a nested class.

In oracle DBMS, which is the strong password management feature that ensures a user cannot use the same password for a specific duration of time?

  1. Account blocking

  2. Account locking

  3. Password history

  4. Password verification

  5. Password matching


Correct Option: C
Explanation:

DBMS keeps the track of old password for specified duration of time as mentioned in the policy, and it does not allow the user to reset the same password for that duration.

What user privilege is required to create a new database in oracle?

  1. Resource

  2. Network Admin

  3. System Admin

  4. DBA

  5. SYSDBA


Correct Option: E
Explanation:

SYSDBA is the actual privilege required or given to DBA to create a new database.

Which of the following values is equivalent to 4.3 E -24?

  1. 4.3 x 10 x 24

  2. 4.3 x 24

  3. 4.3 x 10-24

  4. 4.3 x 1024

  5. None of these


Correct Option: C
Explanation:

4.3 E -24 = 4.3 X 10-24. It is the correct answer.

Operator overloading is not possible for which of the following operators?

  1. Arrow operator

  2. Scope resolution operator

  3. Assignment operator

  4. Equality operator

  5. None of these


Correct Option: B
Explanation:

Scope resolution operator overloading is not possible.

What is the level of C language in context to computer programming languages?

  1. High level

  2. Low level

  3. Middle level

  4. Upper level

  5. None of these


Correct Option: C
Explanation:

The language belongs between high and low level, i.e. C.

Expand the acronym STL in terms of C++.

  1. Serial Template Library

  2. Simple Template Library

  3. Standard Template Library

  4. Single Type Library

  5. Static Template Library


Correct Option: C
Explanation:

Standard Template Library (STL) is a C++ software library. It is the corect expansion of the term.

What is the symbol of of scope resolution operator in C language?

  1. ||

  2. *

  3. >

  4. ::


Correct Option: E
Explanation:

Scope resolution operator. It is used to call a global variable if local and global variables are declared with same name. In general call to variable in functions priority goes to local variable. Hence, to call global specifically, this operator is used.

- Hide questions