Tag: c sharp

Questions Related to c sharp

  1. using base keyword

  2. using super keyword

  3. creating object of parent within child

  4. using this keyword


Correct Option: A
  1. Sealed

  2. Abstract

  3. Private

  4. Protected


Correct Option: A
  1. Spoke

  2. Hub

  3. Satellite

  4. Sputnik


Correct Option: C
Explanation:

To answer this question, we need knowledge about the terminology used in computer programming or software development.

The correct answer is: C. Satellite

Explanation:

A satellite assembly is an assembly that contains localized resources such as strings, images, and other types of data specific to a particular culture or language. These assemblies are used in internationalization and localization of software applications to provide different language versions or regional variations of the application.

Option A: Spoke is not the correct answer. In the context of computer programming or software development, "spoke" is not a term used to describe an assembly that contains localized resources.

Option B: Hub is not the correct answer. In the context of computer programming or software development, "hub" is not a term used to describe an assembly that contains localized resources.

Option D: Sputnik is not the correct answer. In the context of computer programming or software development, "sputnik" is not a term used to describe an assembly that contains localized resources.

Therefore, the correct answer is C. Satellite.

  1. Overriding

  2. Overloading

  3. Shadowing

  4. Method Hiding

  5. Both c and d


Correct Option: E
  1. Static polymorphism

  2. Dynamic polymorphism

  3. Both static and dynamic polymorphism

  4. Not a polymorphism


Correct Option: B
  1. +=

  2. *=

  3. ?=

  4. ?:


Correct Option: D

A variable which is declared inside a method is called a________variable

  1. Serial

  2. Local

  3. Private

  4. Static


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of variable scope in programming.

Option A) Serial - This option is incorrect because "serial" is not a term used to describe a variable declared inside a method.

Option B) Local - This option is correct because a variable declared inside a method is called a local variable. Local variables are only accessible within the method in which they are declared.

Option C) Private - This option is incorrect because "private" is a term used to describe the visibility of class members, not variables declared inside a method.

Option D) Static - This option is incorrect because "static" is a term used to describe variables that belong to the class itself, rather than instances of the class.

The correct answer is B) Local. This option is correct because a variable declared inside a method is indeed called a local variable.

  1. It can be used anywhere in the program

  2. It must accept a class

  3. It must be declared within a method

  4. It represent a class object


Correct Option: D

Which of the following jobs are NOT performed by Garbage Collector?

  1. Freeing memory on the stack.

  2. Avoiding memory leaks.

  3. Freeing memory occupied by unreferenced objects.

  4. Closing unclosed database collections.

  5. Closing unclosed files.


Correct Option: A,D,E

AI Explanation

To answer this question, let's go through each option and determine whether it is performed by the Garbage Collector:

Option A) Freeing memory on the stack - This option is NOT performed by the Garbage Collector. The Garbage Collector is responsible for freeing memory occupied by objects on the heap, not on the stack.

Option B) Avoiding memory leaks - This option is performed by the Garbage Collector. The Garbage Collector identifies and collects memory that is no longer referenced, preventing memory leaks.

Option C) Freeing memory occupied by unreferenced objects - This option is performed by the Garbage Collector. The Garbage Collector identifies objects that are no longer referenced by the program and frees the memory occupied by those objects.

Option D) Closing unclosed database collections - This option is NOT performed by the Garbage Collector. Closing unclosed database collections is typically the responsibility of the programmer or the database management system, not the Garbage Collector.

Option E) Closing unclosed files - This option is NOT performed by the Garbage Collector. Closing unclosed files is typically the responsibility of the programmer or the operating system, not the Garbage Collector.

Therefore, the correct answer is A, D, and E. These options are not performed by the Garbage Collector.