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 Sharp - Bài 06
Ngày làm bài: Hôm nay lúc 06:23:57 (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-
class Test{
Static void Main() {
int [] Array1 = {3,2,1);
int i = Array.IndexOf(Array1,3);
Console.WriteLine(i)
}
}
What will be the output of above code?
  A - 
3
  B - 
1
  C - 
0
  D - 
2
2-
class Question(
public Hashtable Directory = new Hashtable();
public string this[string Person] {
get {
return (string) Directory[Person];
}
set {
Directory[Person] = value;
}
}
}
Class Test {
static void Main() {
Question Dir = new Question();
// Add code here ……………….
}
}
Two persons named SMITH and MARTIN are to be added in the directory created above. To achieve this which of the following are the valid statements that can be added in the sace specified in the .code above?
  A - 
Dir[ ^ S^ ]=^ SMITH^ ; Dir[ ^ M^ ]=^ MARTIN^ ;
  B - 
Directory[ ^ SMITH^ ]=^ S^ ; Directory[MARTIN]= ^ M^ ;
  C - 
Directory[ ^ S^ ]=^ SMITH^ ; Directory[ ^ M^ ]=^ MARTIN^ ;
  D - 
Dir[ ^ SMITH^ ]; Dir[ ^ MARTIN^ ];
3-
Consider the class below:
Public class Test {
Public static void Main( ) {
int [ ] a = { 99, 22, 11, 55, 44, 88, 2, -3 };
int result = 0;
for ( int I = 0; i < a.Lenght; i++)
{
if ( a[ i ] > 30)
result += a[ i ];
} //end for
Console.WriteLine( "Result is: ", result );
}
}
The ouput of this C# program will be:
  A - 
Result is: 332
  B - 
Result is: 286
  C - 
Result is: 280
  D - 
Result is: 154
4-
Within the namspace we can declare following:
  A - 
Class
  B - 
Delegates
  C - 
All the options mentioned
  D - 
Interface
5-
Concatenating with strings are done with:
  A - 
method calls
  B - 
operator overloading
  C - 
reserved words
  D - 
operator overloading and method calls
6-
class IndexExample{
String Message;
Public static void Main() {
IndexExample obj=new IndexExample("WELCOME");
for(int i=0; i < 7; i++) {
System.Comsole.Write(obj[i]);
}
}
Public IndexExample (string s) { Message=s }
Public string this[int 1] {
get {
if(i >= 0 && i < Message.Length)
return Message.Substring(i, 1: ;
else
return "";
set {
if(i >= 0 && i < Message.Length)
Message=Message.Substring(0,i: +value + Message.Substring(i+1);
}
}
}
What will be the output of above code?
  A - 
The code will compile successfully and output will be;
WELCOME
  B - 
All over above
  C - 
Code will generate a run time error
  D - 
#
7-
Consider this example:
Class Example
{
Void firstMethod( )
{
in myVar;
. . .
Void anotherMethod( )
{
myVar = 42;
. . .
}
}
  A - 
This code OK. Another variable myVar is automatically create, and set to 42
  B - 
This code would fail to compile because anotherMethod is trying to use the variable myVar, which is not scope
  C - 
This code would fail to compile because anotherMethod is trying to use the variable myVar, which is not get memory with new() keyword
  D - 
This code OK. myVar is set to 42
8-
Consider array items, which contains the values 0, 2, 4, 6 and 8. If method changeArray is called with the method call changeArray( item, items[ 2 ] ), what values are stored in items after the method has finished executing?
Public static void ChangeArray( int[ ] passeArray, int value )
{
passedArray[ value ] = 12;
value = 5;
} // end method ChangeArray
  A - 
0, 2, 4, 6, 12
  B - 
0, 2, 12, 6, 8
  C - 
0, 2, 4, 6, 5
  D - 
0, 2, 5, 6, 12
9-
Contructors can not have ____.
  A - 
name
  B - 
overloaded constructors
  C - 
return values
  D - 
Argument
10-
Defining two methods with the same name but with different parameters is called.
  A - 
Loading
  B - 
Duplexing
  C - 
Multiplexing
  D - 
Overloading
 
[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 C# - Bài 44
Trắc nghiệm Linux - Bài 38
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 24
Trắc Nghiệm Java - Bài 01
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 84
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 12
Trắc Nghiệm Java - Bài 28
Trắc nghiệm Linux - Bài 61
Trắc Nghiệm Java - Bài 36
Trắc Nghiệm Visual Basic - Bài 22
Trắc nghiệm XML - Bài 14
Trắc Nghiệm C# - Bài 34
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 23
Trắc Nghiệm Visual Basic - Bài 03
Trắc Nghiệm ASP.NET - Bài 17
Trắc Nghiệm Pascal - Bài 32
Trắc Nghiệm Thiết Kế Web (English) - Bài 49
Trắc nghiệm Linux - Bài 63
Trắc Nghiệm Pascal - Bài 26
Trắc Nghiệm Java - Bài 26
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