.NET and COBOL Programming Quiz

A quiz covering fundamentals of .NET/VB.NET programming and COBOL programming languages, including data types, exception handling, collections, and compiler options.

20 Questions Published

Questions

Question 1 True/False

dual main is possible

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

Which among this is a valid Method of File Class ?

  1. ReadAllLine()
  2. ReadAllBytes()
  3. ReadAllTexts()
  4. WriteAllLine()
  5. WriteAllTexts()
Question 3 Multiple Choice (Single Answer)

What compiler option would you use for dynamic linking?

  1. DYNAM
  2. DYN
  3. DYNA
  4. None of the above
Question 4 Multiple Choice (Single Answer)

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

  1. SSRANGE
  2. NOSSRANGE
  3. RANGE
  4. None of the above
Question 5 Multiple Choice (Single Answer)

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
Question 6 Multiple Choice (Single Answer)

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
Question 7 Multiple Choice (Single Answer)

if a not = b and c Means

  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
Question 8 True/False

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

  1. True
  2. False
Question 9 Multiple Choice (Single Answer)

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

  1. 4
  2. 3
  3. 2
  4. None of the above
Question 10 Multiple Choice (Single Answer)

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
Question 11 Multiple Choice (Single Answer)

What is COMP-1?

  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
Question 12 Multiple Choice (Single Answer)

which one of the following is a scope terminator?

  1. end-evaluate
  2. exit
  3. continue
  4. None of the above
Question 13 True/False

A class may implement several interfaces but A class may extend only one abstract class

  1. True
  2. False
Question 14 Multiple Choice (Multiple Answers)

Which is the base class for All built in Controls?

  1. User Control
  2. Custom Control
  3. Control
  4. Activex Control
Question 15 Multiple Choice (Multiple Answers)

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
Question 16 Multiple Choice (Multiple Answers)

Which of the following are the valid method of command object

  1. ExecuteNonQuery & ExecuteScalar
  2. ExecuteQuery & ExecuteScalar
  3. ExecuteParameter
  4. None
Question 17 Multiple Choice (Multiple Answers)

Which is not a collection type in VB.Net

  1. Hashtable
  2. ArrayList
  3. Heap
  4. Stack
Question 18 Multiple Choice (Multiple Answers)

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
Question 19 Multiple Choice (Multiple Answers)

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
Question 20 Multiple Choice (Multiple Answers)

How do you trigger an event in VB.NET

  1. RaiseEvent keyword
  2. TriggerEvent keyword
  3. AddEvent Keyword
  4. None