programming languages Online Quiz - 213

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

What is the keyword used in overriding

  1. virtual,override

  2. override,new

  3. new,base

  4. base,override

Correct Option: A

class test : Form {}

  1. Creates the class Test : Form

  2. Creates the class Test that inherits the class Form

  3. Creates the class form that inherits the class Test

  4. a and b

Correct Option: B

In the body of a method, C# uses the variable named_____to refer to the current object whose method is being invoked.

  1. call

  2. this

  3. do

  4. that

Correct Option: B

Which method would be used to invoke a delegate type asynchronously in C#?

  1. Invoke()

  2. StartInvoke()

  3. BeginInvoke()

  4. SetInvoke()

Correct Option: C

Which of the following datatype is not a reference type?

  1. Delegate

  2. Array

  3. Enum

  4. Class

Correct Option: C

Which element of a document's source code defines how the markup processor should interpret the tags in the source?

  1. The type of tag used

  2. The version of the markup language that the source uses

  3. The document type declaration

  4. None

Correct Option: C

Which of the following tells a markup language processor which rules to use to interpret a document?

  1. LANGUAGE tag

  2. Document type definition

  3. TYPE tag

  4. Document tag

Correct Option: B

Which of the following is the purpose of a metamarkup language?

  1. It describes the tags in existing languages

  2. It defines new markup languages

  3. It parses the code in existing markup languages

  4. All

Correct Option: B

Which of the following can be defined using a markup language?

  1. Programming events

  2. Text appearance

  3. Relationships between data

  4. Text structure

Correct Option: B,D

Which of the following are actual uses for XML?

  1. Data storage

  2. Database retrieval

  3. Data migration

  4. N-tier development

Correct Option: A,B,C,D

You can write a Console Application or a Windows Application in C#, without using Visual Studio.

  1. True

  2. False

Correct Option: A

The Intellisense feature of Visual Studio interactively guesses, and lists all the types, methods etc. as you go on typing. How does it work?

  1. .NET Remoting Services

  2. XML

  3. Reflections

  4. Web Services

Correct Option: C

When you write using System, at the beginning of a C# Program, the meaning of System is

  1. A header file

  2. An Assembly or .dll

  3. An executable

  4. A COM Component

Correct Option: B

Which of the following is correct way to compile a C# program file.cs, and add a reference to an external assembly Vehicle.dll?

  1. csc /target:library file.cs

  2. csc /target:exe file.cs

  3. csc Vehicle.dll file.cs

  4. csc /r:Vehicle.dll file.cs

Correct Option: D

Which of the following is not true?

  1. The root class(super class) of all classes in C# is Object

  2. Constructors in C# can be static

  3. When you override <= operator, you must override >= operator

  4. If you write your own constructor in a class, C# also provides a default constructor

Correct Option: D

When you write a program in C#, it is compiled to

  1. C# Language Code

  2. Assembly Language Code

  3. Intermediate Language which CLR understands

  4. Pseudo-code

Correct Option: C

How do you make a .NET Assembly public/universally visible to all applications, so that they can share it?

  1. By registering it in Windows Registry

  2. By signing the assembly using a strong-named key and adding it to GAC

  3. By putting it in C:\Windows Folder

  4. By setting the Environment Variables

Correct Option: B

Consider 3 classes A,B,C. A's child class is B, B's child class is C. Inheritance hierarchy is A->B->C. You write in Main(), C obj = new C(); In what order are the constructors called?

  1. B, C

  2. C, B and A

  3. A, B and C

  4. Object, A, B and C

Correct Option: D

How do you define a pointer to a function that returns a character pointer and receives another pointer to function that neithers takes an argument nor returns anything.

  1. char * (f* (*) ))

  2. char * ( f) (()());

  3. (char) (f) (());

  4. (char) (*f) ()();

Correct Option: B

Given: class Scoop { static int thrower() throws Exception { return 42; } public static void main(String [] args) { try { int x = thrower(); } catch (Exception e) { X++; } finally { System.out.printIn("x = " + ++x); } } }

  1. x = 42

  2. x = 43

  3. x = 44

  4. Compilation fails

Correct Option: D
- Hide questions