Tìm kiếm:
TRANG NHÀ
Giới thiệu VNEDU.ORG
Điều khoản và bản quyền
Liên lạc VNEDU
TRẮC NGHIỆM TRỰC TUYẾN
---Công Cụ:---
Soạn Biểu thức
Bảng màu HTML
Ký hiệu đặc biệt 01
Ký hiệu đặc biệt 02
Ký hiệu đặc biệt 03
Ký hiệu đặc biệt 04
Ký hiệu đặc biệt 05
Ký hiệu đặc biệt 06
Ký hiệu đặc biệt 07
Ký hiệu đặc biệt [Toán]
Tin Học   ||  Căn Bản    Văn Phòng    Hệ Thống - Mạng    Phần Mềm Ứng Dụng    Kỹ thuật số    Lập trình    SQL  

Trắc Nghiệm C# - Bài 44
Ngày làm bài: Hôm nay lúc 06:04:56 (Server time)
Số câu hỏi: 10.   Tổng điểm: 10
Yêu cầu hoàn thành: 60 phút.
Thời gian còn lại: 
Cỡ chữ câu hỏi:  Cỡ chữ đáp án:


1-
Which of the following statements are correct about constructors in C#.NET?
1/ Constructors cannot be overloaded.
2/ Constructors always have the name same as the name of the class.
3/ Constructors are never called explicitly.
4/ Constructors never return any value.
5/ Constructors allocate space for the object in memory.
  A - 
2, 3, 4
  B - 
3, 5
  C - 
4, 5
  D - 
None of these
2-
How many times can a constructor be called during lifetime of the object?
  A - 
As many times as we call it.
  B - 
Only once.
  C - 
Depends upon a Project Setting made in Visual Studio.NET.
  D - 
Any number of times before the object gets garbage collected.
3-
Which of the following statements are correct about the C#.NET code snippet given below?
class Sample
{
    static int i;
    int j;
    public void proc1()
    {
        i = 11; 
        j = 22;
    }
    public static void proc2()
    {
        i = 1;
        j = 2;
    }
    static Sample()
    {
        i = 0; 
        j = 0;
    }
}

  A - 
i cannot be initialized in proc1().
  B - 
proc1() can initialize i as well as j.
  C - 
j can be initialized in proc2().
  D - 
The constructor can never be declared as static.
4-
Which of the following statements is correct?
  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.
5-
Which of the following statements are correct about static functions?
  A - 
Static functions are invoked using objects of a class.
  B - 
Static functions can access static data as well as instance data.
  C - 
Static functions are outside the class scope.
  D - 
Static functions are invoked using class.
6-
What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{ 
    class Sample
    { 
        static Sample()
        { 
            Console.Write("Sample class ");
        }
        public static void Bix1()
        { 
            Console.Write("Bix1 method ");
        } 
    } 
    class MyProgram
    { 
        static void Main(string[ ] args)
        { 
            Sample.Bix1();
        } 
    } 
}

  A - 
Sample class Bix1 method
  B - 
Bix1 method
  C - 
Sample class
  D - 
Bix1 method Sample class
7-
Which of the following statements is correct about constructors in C#.NET?
  A - 
A constructor cannot be declared as private.
  B - 
A constructor cannot be overloaded.
  C - 
A constructor can be a static constructor.
  D - 
A constructor cannot access static data.
8-
What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
    class Sample
    { 
        public static void fun1()
        { 
            Console.WriteLine("Bix1 method");
        }
        public void fun2()
        { 
            fun1(); 
            Console.WriteLine("Bix2 method");
        }
        public void fun2(int i)
        { 
            Console.WriteLine(i);
            fun2(); 
        } 
    } 
    class MyProgram
    { 
        static void Main(string[ ] args)
        { 
            Sample s = new Sample(); 
            Sample.fun1(); 
            s.fun2(123);
        } 
    } 
}

  A - 
Bix1 method
123
Bixl method
Bix2 method
  B - 
Bix1 method
123
Bix2 method
  C - 
Bix2 method
123
Bix2 method
Bixl method
  D - 
Bixl method
123
9-
Which of the following can be facilitated by the Inheritance mechanism?
1/ Use the existing functionality of base class.
2/ Overrride the existing functionality of base class.
3/ Implement new functionality in the derived class.
4/ Implement polymorphic behaviour.
5/ Implement containership.
  A - 
1, 2, 3
  B - 
3, 4
  C - 
2, 4, 5
  D - 
3, 5
10-
Which of the following statements should be added to the subroutine fun( ) if the C#.NET code snippet given below is to output 9 13?
class BaseClass
{
    protected int i = 13;
}
class Derived: BaseClass
{
    int i = 9; 
    public void fun()
    {
        // [*** Add statement here ***]
    } 
}

  A - 
Console.WriteLine(base.i + " " + i);
  B - 
Console.WriteLine(i + " " + base.i);
  C - 
Console.WriteLine(mybase.i + " " + i);
  D - 
Console.WriteLine(i + " " + mybase.i);
 
[Người đăng: Thành Lãm - ST]
Ghé thăm Kênh của Vị Sư "hai lần chết đi sống lại"
Tu Si Chau Soc Thon

https://www.youtube.com/channel/UCoyC9WTTVR-M3qpTKKEXGnQ

Chau Soc Thon Official Channel


Phong Bảo Official
Phong Bao Official
Xem Nhiều nhất
Trắc Nghiệm Pascal - Bài 20
Trắc Nghiệm ASP.NET - Bài 12
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm ASP.NET - Bài 01
Trắc Nghiệm ASP.NET - Bài 03
Trắc nghiệm C++ - Bài 18
Trắc Nghiệm C# - Bài 53
Trắc Nghiệm ASP.NET - Bài 02
Trắc Nghiệm C# - Bài 42
Trắc Nghiệm Java - Bài 01
Trắc Nghiệm ASP.NET - Bài 04
Trắc Nghiệm Pascal - Bài 22
Trắc Nghiệm ASP.NET - Bài 13
Trắc Nghiệm ASP.NET - Bài 09
Trắc Nghiệm ASP.NET - Bài 08
Trắc nghiệm PHP - Bài 01
Trắc Nghiệm ASP.NET - Bài 06
Trắc Nghiệm ASP.NET - Bài 11
Trắc Nghiệm ASP.NET - Bài 05
Trắc Nghiệm ASP.NET - Bài 23
Đề Xuất
Trắc Nghiệm ASP.NET (English) - Bài 17
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 20
Trắc Nghiệm ASP.NET (English) - Bài 24
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 33
Trắc Nghiệm Thiết Kế Web (English) - Bài 39
Trắc Nghiệm Java - Bài 47
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 05
Trắc Nghiệm ASP.NET - Bài 22
Trắc nghiệm XML - Bài 09
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 57
Trắc nghiệm XML - Bài 28
Trắc Nghiệm Java - Bài 26
Trắc nghiệm Linux ( English ) - Bài 27
Trắc Nghiệm Pascal - Bài 12
Trắc Nghiệm Visual Basic - Bài 03
Trắc Nghiệm Pascal - Bài 14
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 27
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 79
Trắc nghiệm XML - Bài 16
Trắc nghiệm XML - Bài 03
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG

free counters