programming languages Online Quiz - 154

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

Which of the following are legal array declarations.

  1. int i[][];

  2. int i[5][5];

  3. int []i[];

  4. int[][] a;

Correct Option: A,C,D

The number of characters in an object of a class String is given by?

  1. The member variable called length

  2. The method length() returns the number of characters.

  3. The member variable called size

  4. The method size() returns the number of characters.

Correct Option: B

How many comparisons can a single COBOL if statement make?

  1. COBOL if statements are not used to compare variable values

  2. 1

  3. 2

  4. 3

Correct Option: B

Which of the following errors are possible within a COBOL IF statement?

  1. Infinite loop

  2. logical error

  3. runtime error

  4. All of the above

Correct Option: D

The COBOL perform loop is the equivalent of which of the following structures found in other languages, such as Java or C++ ?

  1. For Loop

  2. Do-While Loop

  3. Nested Loop

  4. While Loop

Correct Option: B

Which is the correct ASCII collating sequence?

  1. spaces, special characters, 0-9, A-Z, a-z

  2. spaces, a-z, A-Z, 0-9, special characters

  3. a-z, A-Z, 0-9, spaces, special characters

  4. 0-9, special characters, spaces, a-z, A-Z

Correct Option: A

You store it as YYYYMMDD in 8 bytes. What is the COBOL definition of this field?

  1. Pic Y(4)M(2)D(2)

  2. Pic date(yyyymmdd)

  3. Pic date(8)

  4. Pic X(8)

Correct Option: D

User defined names must follow which one of the following rules?

  1. Multiple word names must be separated with an underscore

  2. Names must be 10 or less characters

  3. Names must contain at least 1 alpha character in any position

  4. Names must be lower case

Correct Option: C

Cobol paragraphs contain sentences. A sentence must end in a period and can contain multiple statements.

  1. TRUE

  2. FALSE

  3. Cant say

  4. still thinking

Correct Option: A

Sentences and statements must start on a new line.

  1. TRUE

  2. FALSE

  3. Cant say

  4. None of the above

Correct Option: B

Condition names are names associated with a field that take on a true/false status depending on whether their value is equal to the field value. They are indicated by a level number of what?

  1. 55

  2. 66

  3. 77

  4. 88

Correct Option: D

If we are limited to 5 bytes of storage, is there be a way to store a complete 8 digit date?

  1. YES

  2. NO

  3. Cant say

  4. None of the above

Correct Option: B

Can Abstarct class have a constructor?

  1. True

  2. False

Correct Option: A

lambda operator(=>) is a C# 2008 feature. Where is lambda operator mainly used?

  1. Database Operations

  2. Delegate Operations

  3. File Handling Operations

  4. Memory Stream Operations

Correct Option: B

Give Some Examples of Generic Classes?

  1. List,HashSet

  2. Queue

  3. Stack

  4. LinkedList

  5. All the above

Correct Option: E

Which two DataAdapter events fire for each row updated against a datasource?

  1. RowUpdating, AfterUpdate

  2. BeforeUpdate, RowUpdating

  3. RowUpdating, RowUpdated

  4. BeforeUpdate, AfterUpdate

  5. BeforeUpdate, RowUpdated

Correct Option: C

To quit a c# application the following should be used?

  1. Application.Exit();

  2. System.Environment.Exit(0)

  3. System.Environment.Exit(1)

  4. All the above

Correct Option: D
  1. String s=#”\teststring”;

  2. String s=”’\n teststring”;

  3. String s=@”\teststring”;

  4. none of above

Correct Option: C

Which of the following statements correctly declares a 2 dimensional array in c#?

  1. int[,] myarray;

  2. int[][] myarray

  3. int[2] myarray

  4. none of above

Correct Option: A
- Hide questions