logo

CuriousTab

CuriousTab

Discussion


Home C# Programming Constructors See What Others Are Saying!
  • Question
  • Which of the following statements is correct?


  • Options
  • A. There is one garbage collector per program running in memory.
  • B. There is one common garbage collector for all programs.
  • C. An object is destroyed by the garbage collector when only one reference refers to it.
  • D. We have to specifically run the garbage collector after executing Visual Studio.NET.

  • Correct Answer
  • There is one common garbage collector for all programs. 


  • More questions

    • 1. Which of the following security features can .NET applications avail?

      1. PIN Security
      2. Code Access Security
      3. Role Based Security
      4. Authentication Security
      5. Biorhythm Security

    • Options
    • A. 1, 4, 5
    • B. 2, 5
    • C. 2, 3
    • D. 3, 4
    • Discuss
    • 2. Which of the following is an ordered collection class?

      1. Map
      2. Stack
      3. Queue
      4. BitArray
      5. HashTable

    • Options
    • A. 1 only
    • B. 2 and 3 only
    • C. 4 and 5 only
    • D. All of the above
    • E. None of the above
    • Discuss
    • 3. Which of the following components of the .NET framework provide an extensible set of classes that can be used by any .NET compliant programming language?

    • Options
    • A. .NET class libraries
    • B. Common Language Runtime
    • C. Common Language Infrastructure
    • D. Component Object Model
    • E. Common Type System
    • Discuss
    • 4. What will be the output of the C#.NET code snippet given below?

      int i = 2, j = i;
      if (Convert.ToBoolean((i | j & 5) & (j - 25 * 1)))
          Console.WriteLine(1); 
      else
          Console.WriteLine(0);

    • Options
    • A. 0
    • B. 1
    • C. Compile Error
    • D. Run time Error
    • Discuss
    • 5. The string built using the String class are immutable (unchangeable), whereas, the ones built- using the StringBuilder class are mutable.

    • Options
    • A. True
    • B. False
    • Discuss
    • 6. Which of the following statements are correct?

      1. The signature of an indexer consists of the number and types of its formal parameters.
      2. Indexers are similar to properties except that their accessors take parameters.
      3. Accessors of interface indexers use modifiers.
      4. The type of an indexer and the type of its parameters must be at least as accessible as the indexer itself.
      5. An interface accessor contains a body.

    • Options
    • A. 1, 3, 5
    • B. 1, 2, 4
    • C. 3, 5
    • D. 2, 4
    • Discuss
    • 7. Which of the following is the correct way to implement the interface given below?

      interface IPerson
      { 
          String FirstName
          {
              get;
              set; 
          } 
      }

    • Options
    • A.
      class Employee : IPerson
      {
          private String str; 
          public String FirstName
          {
              get
              { 
                  return str;
              } 
              set
              { 
                  str = value;
              } 
          } 
      }
    • B.
      class Employee
      {
          private String str;
          public String IPerson.FirstName
          { 
              get
              { 
                  return str;
              } 
              set
              { 
                  str = value;
              } 
          } 
      }
    • C.
      class Employee : implements IPerson
      {
          private String str; 
          public String FirstName
          { 
              get
              { 
                  return str;
              } 
              set
              {
                  str = value; 
              } 
          } 
      }
    • D. None of the above
    • Discuss
    • 8. Which of the following are reuse mechanisms available in C#.NET?

      1. Inheritance
      2. Encapsulation
      3. Templates
      4. Containership
      5. Polymorphism

    • Options
    • A. 1, 4
    • B. 1, 3
    • C. 2, 4
    • D. 3, 5
    • Discuss
    • 9. If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().

    • Options
    • A. True
    • B. False
    • Discuss
    • 10. Which of the following is NOT a namespace in the .NET Framework Class Library?

    • Options
    • A. System.Process
    • B. System.Security
    • C. System.Threading
    • D. System.Drawing
    • E. System.Xml
    • Discuss


    Comments

    There are no comments.

Enter a new Comment