MCQsLlearn App Free MCQsLearn App Download - Android - iOS
As an Amazon Associate I earn from qualifying purchases.

DBMS Notes and Technology Articles

Type conversion Practice Test PDF Download eBook - 60

Practice Type conversion mock test for exam, type conversion MCQ with answers PDF to solve app development worksheet 60 for online past papers exam. Practice More About Variables trivia questions and answers, type conversion Multiple Choice Questions (MCQ) to solve c sharp test with answers for online information technology degree. Free type conversion MCQs, MCQs, structures, enumerations, type conversion test prep for programming certifications.

"Select a solution for the following statements: <br /><code> static void Main(string[] args) { int num1 = 20000; int num2 = 50000; long total; total = num1 + num2; Console.WriteLine("Total is : " +total); Console.ReadLine(); }</code>", type conversion Multiple Choice Questions (MCQ) with choices conversion is implicit type, no error generation, compiler will generate runtime error, specifying data type for conversion externally will solve the problem, and none of the mentioned for online MS degree in computer science. Learn more about variables questions and answers with free online certification courses for IT certifications.

Trivia Quiz on Type conversion PDF Download eBook 60

Type conversion Quiz

MCQ: Select a solution for the following statements: <br /><code> static void Main(string[] args) { int num1 = 20000; int num2 = 50000; long total; total = num1 + num2; Console.WriteLine("Total is : " +total); Console.ReadLine(); }</code>

  1. Compiler will generate runtime error
  2. Conversion is implicit type, no error generation
  3. Specifying data type for conversion externally will solve the problem
  4. None of the mentioned

B

Type conversion Quiz

MCQ: What will the following code result into <br/> <code> byte destinationVar; short sourceVar = 281; destinationVar = (byte)sourceVar; Console.WriteLine("sourceVar val: {0}", sourceVar); Console.WriteLine("destinationVar val: {0}", destinationVar); </code>

  1. sourceVar val: 281 destinationVar val: 25
  2. sourceVar val: 281 destinationVar val: 281
  3. sourceVar val: 281 destinationVar val: ?
  4. sourceVal val:281 destinationVar val: e^25

A

Enumerations Quiz

MCQ: The type that cannot be used as a data type for an enum in C#.NET is

  1. short type
  2. double
  3. int
  4. float

B

Structures Quiz

MCQ: Choose the correct statement regarding the code <br/> <code> struct Book { private String name; private int noofpages; private Single price; } Book b = new Book(); </code>

  1. The structure variable 'b' will be created on the heap
  2. We can add a zero-argument constructor to the above structure.
  3. When the program terminates, variable b will get garbage collected.
  4. The structure variable b will be created on the stack.

D

Interfaces Quiz

MCQ: The correct of the following regarding interfaces in C# is

  1. One class can implement only one interface.
  2. In a program if one class implements an interface then no other class in the same program can implem
  3. From two base interfaces a new interface cannot be inherited.
  4. Properties can be declared inside an interface.

D