0

programming languages Online Quiz - 153

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

dual main is possible

  1. True

  2. False


Correct Option: A
  1. ReadAllLine()

  2. ReadAllBytes()

  3. ReadAllTexts()

  4. WriteAllLine()

  5. WriteAllTexts()


Correct Option: B

What compiler option would you use for dynamic linking?

  1. DYNAM

  2. DYN

  3. DYNA

  4. None of the above


Correct Option: A

Default compiler options with respect to subscript out of range checking.

  1. SSRANGE

  2. NOSSRANGE

  3. RANGE

  4. None of the above


Correct Option: B

AI Explanation

To understand the default compiler options with respect to subscript out of range checking, let's go through each option:

Option A) SSRANGE - This option is incorrect because SSRANGE is not the default compiler option for subscript out of range checking. It enables runtime checking of subscript ranges.

Option B) NOSSRANGE - This option is correct because NOSSRANGE is the default compiler option for subscript out of range checking. It disables runtime checking of subscript ranges.

Option C) RANGE - This option is incorrect because RANGE is not a valid compiler option for subscript out of range checking.

Option D) None of the above - This option is incorrect because the correct option is B) NOSSRANGE.

The correct answer is B) NOSSRANGE. This option is correct because it is the default compiler option for subscript out of range checking, disabling the runtime checking of subscript ranges.

01 ws-loop pic 9(02) value 0. Perform varying ws-loop from 1 by 1 until ws-loop = 100 Dispaly 'Have a good day' end-perform. How many times 'Have a good day' will be displayed

  1. 100

  2. 99

  3. 101

  4. None of the above


Correct Option: D

01 ws-var1 pic 9(9).99. 01 ws-var2 pic 9(9)v99 value 10. move zeros to ws-var1. compute ws-var1 = ws-var1 + ws-var2. What would be the value of ws-var1.

  1. 10

  2. 10.00

  3. 10.0

  4. None of the above


Correct Option: D
  1. a not = b and a not = c

  2. a not =b or a not = c

  3. Error in syntax

  4. None of the bove


Correct Option: A

We can redefine an X(10) field with a field of X(20)? . Both are diclared in different level numberes.

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, we need to understand the concept of redefining fields in COBOL.

In COBOL, redefining a field means using the same storage area for two or more different data items. The redefined fields must be of the same size or smaller than the original field.

In this case, we are considering redefining an X(10) field with a field of X(20). Since the redefined field is larger (X(20)) than the original field (X(10)), this is not allowed. Redefining a field with a larger field size would result in data loss or truncation.

Therefore, the correct answer is:

B. False - We cannot redefine an X(10) field with a field of X(20).

How many bytes does a S9(7) COMP-3 field occupy ?

  1. 4

  2. 3

  3. 2

  4. None of the above


Correct Option: A

What is the maximum length of a field you can define using COMP-3?

  1. S9(18) COMP-3

  2. S9(20) COMP-3

  3. S9(80) COMP-3

  4. None of the above


Correct Option: A
  1. Single precision floating point. Uses 4 bytes.

  2. Double precision floating point. Uses 8 bytes.

  3. Double precision floating point. Uses 4 bytes.

  4. None of the above


Correct Option: A

which one of the following is a scope terminator?

  1. end-evaluate

  2. exit

  3. continue

  4. None of the above


Correct Option: A

Which is the base class for All built in Controls?

  1. User Control

  2. Custom Control

  3. Control

  4. Activex Control


Correct Option: C

How do you Dereference an Object in VB.NET

  1. By setting the object to Null

  2. By setting the object to Nothing

  3. With Close keyword

  4. None of the above


Correct Option: B
  1. ExecuteNonQuery & ExecuteScalar

  2. ExecuteQuery & ExecuteScalar

  3. ExecuteParameter

  4. None


Correct Option: A

Which is not a collection type in VB.Net

  1. Hashtable

  2. ArrayList

  3. Heap

  4. Stack


Correct Option: C

You are working on a debug build of an application. You need to find the line of code that caused an exception to be thrown. Which property of the Exception class should you use to achieve this goal?

  1. Data

  2. Message

  3. StackTrace

  4. Source


Correct Option: C

You need to identify a type that meets the following criteria Is always a number Is not greater than 65,535. Which type should you choose?

  1. System.UInt16

  2. int

  3. System.String

  4. System.IntPtr


Correct Option: A

AI Explanation

To answer this question, you need to understand the different data types and their ranges.

Option A) System.UInt16 - This option is correct because UInt16 is an unsigned 16-bit integer data type in C#, which means it can only store positive numbers. It has a range of 0 to 65,535, which satisfies the given criteria.

Option B) int - This option is incorrect because an int is a signed 32-bit integer data type in C#, which means it can store both positive and negative numbers. It has a larger range from -2,147,483,648 to 2,147,483,647, which exceeds the given criteria.

Option C) System.String - This option is incorrect because a string is not a numeric data type. It is used to store text and not numbers.

Option D) System.IntPtr - This option is incorrect because IntPtr is a platform-specific pointer data type and not a numeric data type. It is used to store memory addresses.

The correct answer is Option A) System.UInt16. This option is correct because it is an unsigned 16-bit integer data type in C# that meets the given criteria of always being a number and not being greater than 65,535.

  1. RaiseEvent keyword

  2. TriggerEvent keyword

  3. AddEvent Keyword

  4. None


Correct Option: A
- Hide questions