0

programming languages Online Quiz - 166

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

Can inner classes have static members?

  1. Yes

  2. No

  3. In specific conditions

  4. Not sure


Correct Option: B

Can a class be declared "synchronized"?

  1. Yes

  2. No

  3. In specific conditions

  4. Not sure


Correct Option: B

Which of these statements correctly declares a two-dimensional array in C#?

  1. int[,] testArray;

  2. int[][] testArray;

  3. int[2] testArray;

  4. System.Array[2] testArray;


Correct Option: A

If a method is marked as protected internal who can access it?

  1. Classes that are both in the same assembly and derived from the declaring class.

  2. Only methods that are in the same class as the method in question.

  3. Internal methods can be only be called using reflection.

  4. Classes within the same assembly, and classes derived from the declaring class.


Correct Option: D

What is boxing?

  1. Encapsulating an object in a value type.

  2. Encapsulating a copy of an object in a value type.

  3. Encapsulating a value type in an object.

  4. Encapsulating a copy of a value type in an object.


Correct Option: D
  1. A peripheral assembly designed to monitor permissions requests from an application.

  2. Any DLL file used by an EXE file.

  3. An assembly containing localized resources for another assembly.

  4. An assembly designed to alter the appearance of an application.


Correct Option: C

What is a delegate?

  1. A strongly typed function pointer.

  2. A light weight thread or process that can call a single method.

  3. A reference to an object in a different process.

  4. An inter-process message channel.


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) A strongly typed function pointer - This option is correct. In C#, a delegate is a type that represents references to methods with a specific signature. It is similar to a function pointer in C or C++ but is type-safe and object-oriented.

Option B) A lightweight thread or process that can call a single method - This option is incorrect. A delegate is not a thread or process. It is a type in C# that represents a method.

Option C) A reference to an object in a different process - This option is incorrect. A delegate is not specifically a reference to an object in a different process. It is a type that represents a method.

Option D) An inter-process message channel - This option is incorrect. A delegate is not an inter-process message channel. It is a type that represents a method.

The correct answer is A) A strongly typed function pointer. This option is correct because a delegate in C# is a type that represents references to methods with a specific signature, similar to a function pointer in C or C++.

How does assembly versioning in .NET prevent DLL Hell?

  1. The runtime checks to see that only one version of an assembly is on the machine at any one time.

  2. .NET allows assemblies to specify the name AND the version of any assemblies they need to run.

  3. The compiler offers compile time checking for backward compatibility.

  4. It doesn't


Correct Option: B

Which of the following operations can you NOT perform on an ADO.NET DataSet?

  1. A DataSet can be synchronised with the database.

  2. A DataSet can be synchronised with a RecordSet.

  3. A DataSet can be converted to XML.

  4. You can infer the schema from a DataSet.


Correct Option: B

In Object Oriented Programming, how would you describe encapsulation?

  1. The conversion of one type of object to another.

  2. The runtime resolution of method calls.

  3. The exposition of data.

  4. The separation of interface and implementation.


Correct Option: D
  1. David Stirling

  2. John Sall

  3. Lawrence Joseph

  4. Dennis Richie


Correct Option: B

DATA Step is used for :-

  1. To output the statistical report.

  2. To create a new dataset

  3. To delete a dataset

  4. To read an external file


Correct Option: B,D

PROC CONTENTS is a :-

  1. PROC STEP

  2. DATA STEP

  3. MACRO

  4. FUNCTION


Correct Option: A

SAS DATASETS can be TEMPORARY and as well as PERMANENT.

  1. True

  2. False


Correct Option: A
  1. 1-256 charcters

  2. 8 charcters

  3. 256 charcters

  4. 1-32 charcters


Correct Option: D
  1. Date variable

  2. Date , Character and Numeric varibale

  3. Date and Character variable

  4. Character and Numeric variable


Correct Option: D

Which one is not an Automatic variable in SAS ?

  1. ERROR

  2. N

  3. FORMAT

  4. IORC


Correct Option: C
- Hide questions