c# 插入樹形數據#_C#數據類型能力問題 套裝1

c# 插入樹形數據#

This section contains aptitude questions and answers on C# data types (set 1).

本節包含有關C#數據類型(集合1)的能力問題和答案。

1) "int" is an alias of _________.
  1. System.Int16

  2. System.Int32

  3. System.Int64

  4. System.Byte

Answer & Explanation

Correct answer: 2
System.Int32

int is an alias of System.Int32 type, it takes 32 bits in the memory.

1) “ int”是_________的別名。
  1. System.Int16

  2. System.Int32

  3. System.Int64

  4. 系統字節

答案與解釋

正確答案:2
System.Int32

int是System.Int32類型的別名,它在內存中占用32位。

2) "char" is an alias of _________.
  1. System.Char

  2. System.String

  3. System.Text

  4. Character

Answer & Explanation

Correct answer: 1
System.Char

char is an alias of System.Char type, it takes 2 bytes space in the memory. Read more: char keyword in C#.

2) “ char”是_________的別名。
  1. 系統字符

  2. System.String

  3. 系統文字

  4. 字符

答案與解釋

正確答案:1
系統字符

char是System.Char類型的別名,它在內存中占用2個字節的空間。 : C#中的char關鍵字 。

3) A "byte" type variable stores the value between the range of ________.
  1. -128 to +127

  2. 0 to 127

  3. 0 to 255

  4. 0 to 256

Answer & Explanation

Correct answer: 3
0 to 255

byte is an alias of System.Byte type, it takes 1 byte space in the memory. Read more: byte keyword in C#.

3) “字節”類型變量存儲________范圍之間的值。
  1. -128至+127

  2. 0至127

  3. 0至255

  4. 0至256

答案與解釋

正確答案:3
0至255

byte是System.Byte類型的別名,它在內存中占用1個字節的空間。 : C#中的byte關鍵字 。

4) A "sbyte" type variable stores the value between the range of ________.
  1. -128 to +127

  2. 0 to 127

  3. 0 to 255

  4. 0 to 256

Answer & Explanation

Correct answer: 1
-128 to +127

sbyte stands for signed byte, it's an alias of System.SByte, it takes 1-byte space in the memory. Read more: sbyte keyword in C#.

4) “ sbyte”類型變量存儲________范圍之間的值。
  1. -128至+127

  2. 0至127

  3. 0至255

  4. 0至256

答案與解釋

正確答案:1
-128至+127

sbyte代表有符號字節,它是System.SByte的別名,它在內存中占用1個字節的空間。 : C#中的sbyte關鍵字 。

5) What will be the output of the following program?
static void Main(string[] args)
{
byte a = 10;
byte b = 20;
byte sum = a + b;
Console.WriteLine(sum);
}

  1. 30

  2. Compilation error

  3. Run time error

  4. None

Answer & Explanation

Correct answer: 2
Compilation error: Cannot implicitly convert type 'int' to 'byte'

By default, Arithmetic operation evaluates to 'int'.

To fix this problem, cast the expression as byte sum = (byte) (a+b);

5)以下程序的輸出是什么?
  1. 30

  2. 編譯錯誤

  3. 運行時錯誤

  4. 沒有

答案與解釋

正確答案:2
編譯錯誤:無法將類型'int'隱式轉換為'byte'

默認情況下,算術運算的結果為'int'。

要解決此問題,請將表達式強制轉換為byte sum =(byte)(a + b);

6) What will be the output of the following program?
static void Main(string[] args)
{
sbyte a = -10;
sbyte b = 20;
sbyte sum = a + b;
Console.WriteLine(sum);
}

  1. 10

  2. Compilation error

  3. Run time error

  4. None

Answer & Explanation

Correct answer: 2
Compilation error: Cannot implicitly convert type 'int' to 'sbyte'

By default, Arithmetic operation evaluates to 'int'.

To fix this problem, cast the expression as sbyte sum = (sbyte) (a+b);

6)以下程序的輸出是什么?
  1. 10

  2. 編譯錯誤

  3. 運行時錯誤

  4. 沒有

答案與解釋

正確答案:2
編譯錯誤:無法將類型'int'隱式轉換為'sbyte'

默認情況下,算術運算的結果為'int'。

要解決此問題,請將表達式強制轉換為sbyte sum =(sbyte)(a + b);

7) Which is the correct range int in C#?
  1. 0 to 255

  2. -32,768 to 32,767

  3. -2,147,483,648 to 2,147,483,647

  4. 0 to 4,294,967,295

Answer & Explanation

Correct answer: 3
-2,147,483,648 to 2,147,483,647

The correct range of int is from -2,147,483,648 to 2,147,483,647

7)C#中正確的范圍int是什么?
  1. 0至255

  2. -32,768至32,767

  3. -2,147,483,648至2,147,483,647

  4. 0至4,294,967,295

答案與解釋

正確答案:3
-2,147,483,648至2,147,483,647

int的正確范圍是-2,147,483,648到2,147,483,647

8) Which is the correct range uint in C#?
  1. 0 to 255

  2. -32,768 to 32,767

  3. -2,147,483,648 to 2,147,483,647

  4. 0 to 4,294,967,295

Answer & Explanation

Correct answer: 4
0 to 4,294,967,295

The correct range of uint is from 0 to 4,294,967,295

8)C#中正確的范圍uint是什么?
  1. 0至255

  2. -32,768至32,767

  3. -2,147,483,648至2,147,483,647

  4. 0至4,294,967,295

答案與解釋

正確答案:4
0至4,294,967,295

uint的正確范圍是0到4,294,967,295

9) Which is the correct range long in C#?
  1. -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

  2. 0 to 18,446,744,073,709,551,615

  3. -2,147,483,648 to 2,147,483,647

  4. 0 to 4,294,967,295

Answer & Explanation

Correct answer: 1
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

The correct range of long is from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

9)C#中正確的范圍是多少?
  1. -9,223,372,036,854,775,808至9,223,372,036,854,775,807

  2. 0至18,446,744,073,709,551,615

  3. -2,147,483,648至2,147,483,647

  4. 0至4,294,967,295

答案與解釋

正確答案:1
-9,223,372,036,854,775,808至9,223,372,036,854,775,807

正確的long范圍是-9,223,372,036,854,775,808至9,223,372,036,854,775,807

10) Which is the correct range ulong in C#?
  1. -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

  2. 0 to 18,446,744,073,709,551,615

  3. -2,147,483,648 to 2,147,483,647

  4. 0 to 4,294,967,295

Answer & Explanation

Correct answer: 2
0 to 18,446,744,073,709,551,615

The correct range of long is from 0 to 18,446,744,073,709,551,615

10)在C#中,哪個是正確的范圍?
  1. -9,223,372,036,854,775,808至9,223,372,036,854,775,807

  2. 0至18,446,744,073,709,551,615

  3. -2,147,483,648至2,147,483,647

  4. 0至4,294,967,295

答案與解釋

正確答案:2
0至18,446,744,073,709,551,615

正確的long范圍是從0到18,446,744,073,709,551,615

11) C# is developed by?
  1. Anders Hejlsberg

  2. Dennis richie

  3. Ken Thompson

  4. Bjarne Stroustrup

Answer & Explanation

Correct answer: 1
Anders Hejlsberg

C# is developed by Anders Hejlsberg.

11)C#是由誰開發的?
  1. 安德斯·海斯伯格

  2. 丹尼斯·里奇

  3. 肯·湯普森

  4. 比尼亞·斯特魯斯特魯普(Bjarne Stroustrup)

答案與解釋

正確答案:1
安德斯·海斯伯格

C#由Anders Hejlsberg開發。

12) How many bytes of data can be store in a char variable?
  1. 1 byte

  2. 2 bytes

  3. 4 bytes

  4. 8 bytes

Answer & Explanation

Correct answer: 2
2 bytes

If we declare a variable of char type, it occupies 2 bytes space in memory.

12)char變量中可以存儲多少字節的數據?
  1. 1個字節

  2. 2字節

  3. 4字節

  4. 8字節

答案與解釋

正確答案:2
2字節

如果我們聲明一個char類型的變量,則它將在內存中占用2個字節的空間。

13) What is the equivalent .NET type of float type in C#?
  1. System.Single

  2. System.Double

  3. System.Decimal

  4. System.float

Answer & Explanation

Correct answer: 1
System.Single

In C#.NET System.Single is the equivalent .NET type of float type.

13)C#中浮點類型的等效.NET類型是什么?
  1. 單系統

  2. 系統雙

  3. 系統十進制

  4. 系統浮動

答案與解釋

正確答案:1
單系統

在C#.NET中,Single是等效的.NET類型的float類型。

14) There are following options are given below, which of them is not a valid .NET Type?
  1. System.Single

  2. System.Double

  3. System.Decimal

  4. System.float

Answer & Explanation

Correct answer: 4
System.float

System.float is not available of .NET framework.

14)下面給出了以下選項,其中哪個不是有效的.NET類型?
  1. 單系統

  2. 系統雙

  3. 系統十進制

  4. 系統浮動

答案與解釋

正確答案:4
系統浮動

.NET框架不提供System.float。

15) What is the equivalent .NET type of double type in C#?
  1. System.Single

  2. System.Double

  3. System.Decimal

  4. System.float

Answer & Explanation

Correct answer: 2
System.Double

In C#.NET System.Double is the equivalent .NET type of double type.

15)C#中double類型的等效.NET類型是什么?
  1. 單系統

  2. 系統雙

  3. 系統十進制

  4. 系統浮動

答案與解釋

正確答案:2
系統雙

在C#.NET中,System.Double是double類型的等效.NET類型。

16) What is the equivalent .NET type of decimal type in C#?
  1. System.Single

  2. System.Double

  3. System.Decimal

  4. System.float

Answer & Explanation

Correct answer: 3
System.Decimal

In C#.NET System.Decimal is the equivalent .NET type of decimal type.

16)什么是C#中十進制類型的等效.NET類型?
  1. 單系統

  2. 系統雙

  3. 系統十進制

  4. 系統浮動

答案與解釋

正確答案:3
系統十進制

在C#.NET中,System.Decimal是等效的十進制類型的.NET類型。

17) What is the correct size of float type variable in C#?
  1. 32 bytes

  2. 16 bytes

  3. 4 bytes

  4. 8 bytes

Answer & Explanation

Correct answer: 3
4 bytes

In C# the size of a float variable is 4 bytes.

17)C#中的float類型變量的正確大小是多少?
  1. 32字節

  2. 16字節

  3. 4字節

  4. 8字節

答案與解釋

正確答案:3
4字節

在C#中,浮點變量的大小為4個字節。

18) What is the correct size of double type variable in C#?
  1. 32 bytes

  2. 16 bytes

  3. 4 bytes

  4. 8 bytes

Answer & Explanation

Correct answer: 4
8 bytes

In C# the size of a double variable is 8 bytes.

18)C#中double類型變量的正確大小是多少?
  1. 32字節

  2. 16字節

  3. 4字節

  4. 8字節

答案與解釋

正確答案:4
8字節

在C#中,雙精度變量的大小為8個字節。

19) What is the correct size of decimal type variable in C#?
  1. 32 bytes

  2. 16 bytes

  3. 4 bytes

  4. 8 bytes

Answer & Explanation

Correct answer: 2
16 bytes

In C# the size of a decimal variable is 16 bytes.

19)C#中十進制類型變量的正確大小是多少?
  1. 32字節

  2. 16字節

  3. 4字節

  4. 8字節

答案與解釋

正確答案:2
16字節

在C#中,十進制變量的大小為16個字節。

20) By default a real number is?
  1. Float

  2. Double

  3. Decimal

  4. Single

Answer & Explanation

Correct answer: 2
Double

By default, a real number is Double.

20)默認情況下,實數是?
  1. 浮動

  2. 小數

答案與解釋

正確答案:2

默認情況下,實數為Double。

21) To use real number for float type, what character we need to use as a suffix in C#?
  1. 'f' or 'F'

  2. 'M' or 'm'

  3. 'D' or 'd'

  4. 'K' or 'k'

Answer & Explanation

Correct answer: 1
'f' or 'F'

By default, a real number is Double. To use real number for float type, we need to use 'F'/'f' in suffix of real number.

21)要將實數用于浮點型,我們需要在C#中使用哪個字符作為后綴?
  1. 'f'或'F'

  2. 'M'或'm'

  3. 'D'或'd'

  4. 'K'或'k'

答案與解釋

正確答案:1
'f'或'F'

默認情況下,實數為Double。 要對浮點類型使用實數,我們需要在實數后綴中使用'F'/'f'。

22) To use real number for decimal type, what character we need to use as a suffix in C#?
  1. 'f' or 'F'

  2. 'M' or 'm'

  3. 'D' or 'd'

  4. 'K' or 'k'

Answer & Explanation

Correct answer: 2
'M' or 'm'

By default, a real number is Double. To use real number for decimal type, we need to use 'M'/'m' in suffix of real number.

22)要將實數用于十進制類型,我們需要在C#中使用哪個字符作為后綴?
  1. 'f'或'F'

  2. 'M'或'm'

  3. 'D'或'd'

  4. 'K'或'k'

答案與解釋

正確答案:2
'M'或'm'

默認情況下,實數為Double。 要將實數用于十進制類型,我們需要在實數后綴中使用'M'/'m'。

23) What is the precision of a float type number in C#?
  1. Up to 15 digits

  2. Up to 7 digits

  3. Up to 28 digits

  4. Up to 20 digits

Answer & Explanation

Correct answer: 2
Up to 7 digits

The precision of float numbers in C# is up to 7 digits.

23)C#中浮點類型數字的精度是多少?
  1. 最多15位數字

  2. 最多7位數字

  3. 最多28位

  4. 最多20位

答案與解釋

正確答案:2
最多7位數字

C#中浮點數的精度最高為7位數字。

24) What is the precision of a double type number in C#?
  1. Up to 15 digits

  2. Up to 7 digits

  3. Up to 28 digits

  4. Up to 20 digits

Answer & Explanation

Correct answer: 1
Up to 15 digits

The precision of double numbers in C# is up to 15 digits.

24)C#中雙精度數字的精度是多少?
  1. 最多15位數字

  2. 最多7位數字

  3. 最多28位

  4. 最多20位

答案與解釋

正確答案:1
最多15位數字

C#中雙精度數字的精度最高為15位。

25) What is the precision of a decimal type number in C#?
  1. Up to 15 digits

  2. Up to 7 digits

  3. Up to 28 digits

  4. Up to 20 digits

Answer & Explanation

Correct answer: 3
Up to 28 digits

The precision of decimal numbers in C# is up to 28 digits.

25)C#中十進制類型數字的精度是多少?
  1. 最多15位數字

  2. 最多7位數字

  3. 最多28位

  4. 最多20位

答案與解釋

正確答案:3
最多28位

C#中十進制數字的精度最高為28位。

翻譯自: https://www.includehelp.com/dot-net/c-sharp-data-types-aptitude-questions-and-answers.aspx

c# 插入樹形數據#

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/542241.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/542241.shtml
英文地址,請注明出處:http://en.pswp.cn/news/542241.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

python django框架怎么爬蟲步驟_[Python爬蟲]---Django視頻教程

[↓↓↓資源簡介↓↓↓]Django是一個開放源代碼的Web應用框架,由Python寫成。采用了MVC的框架模式,即模型M,視圖V和控制器C。它最初是被開發來用于管理勞倫斯出版集團旗下的一些以新聞內容為主的網站的,即是CMS(內容管理系統)軟件…

小程序 || 語句_C ++開關語句| 查找輸出程序| 套裝1

小程序 || 語句Program 1: 程序1&#xff1a; #include <iostream>using namespace std;int main(){switch (printf("Hello World")) {case 0x09:cout << " India";break;case 0x0A:cout << " Australia";break;case 0x0B:co…

python爬蟲與django_請問django和爬蟲程序如何整合?

Django 模型是與數據庫相關的&#xff0c;與數據庫相關的代碼一般寫在 models.py 中&#xff0c;Django 支持 sqlite3, MySQL, PostgreSQL等數據庫&#xff0c;只需要在settings.py中配置即可&#xff0c;不用更改models.py中的代碼&#xff0c;豐富的API極大的方便了使用。本節…

Spark的枚舉類型實例!scala的枚舉。

Spark的枚舉類型實例&#xff01;scala的枚舉。Enumeration定義&#xff1a;[deploy] SparkSubmitAction { Value Value }Enumeration使用&#xff1a;appArgs. {SparkSubmitAction.> (appArgs)SparkSubmitAction.> (appArgs)SparkSubmitAction.> (appArgs) }轉載于:…

c ++查找字符串_C ++類和對象| 查找輸出程序| 套裝5

c 查找字符串Program 1: 程序1&#xff1a; #include <iostream>using namespace std;class Sample {int X;int* PTR &X;public:void set(int x) const;void print();};void Sample::set(int x) const{*PTR x;}void Sample::print(){cout << *PTR - EOF <…

mysql8和5.7區別_mysql8.0與mysql5.7安全加密小差別

今天升級到了mysql8.0 做主從同步遇到下面問題2020-07-21T14:09:52.626718Z 13 [ERROR] [MY-010584] [Repl] Slave I/O for channel : error connecting to master slave_replication172.20.0.2:3306 - retry-time: 60 retries: 1 message: Authentication plugin caching_sha2…

c ++查找字符串_C ++類和對象| 查找輸出程序| 套裝3

c 查找字符串Program 1: 程序1&#xff1a; #include <iostream>using namespace std;class Sample {int X;public:void set(int x){X x;}void print(){cout << X << " ";}} A, B;int main(){A.set(10);B.set(20);A.print();B.print();return 0;…

時間輪

老早之前就聽說時間輪算法特別高效&#xff0c;Linux內核都用的它&#xff0c;這兩天抽空實現了遍……嗯&#xff0c;被差一bug搞死(~&#xffe3;▽&#xffe3;~) 啊哈 網上扣來的圖&#xff0c;原理好懂&#xff1a;輪子里的每格代表一小段時間&#xff08;精度&#xff09;…

qc35 說明書_使用Bose QC35 2年的心得 | 遲而不遲的深度體驗 | 文附佩戴效果照片...

小編注&#xff1a;此篇文章來自即可瓜分10萬金幣&#xff0c;周邊好禮達標就有&#xff0c;邀新任務獎勵無上限&#xff0c;點擊查看活動詳情創作立場聲明&#xff1a;本文所測商品為自費購入&#xff0c;我會在文中點明。堅持來自內心的主觀評測是起碼的底線&#xff0c;不會…

threadgroup_Java ThreadGroup類的checkAccess()方法和示例

threadgroupThreadGroup類的checkAccess()方法 (ThreadGroup class checkAccess() method) checkAccess() method is available in java.lang package. checkAccess()方法在java.lang包中可用。 checkAccess() method is used to check whether the currently running thread h…

qt tab彈出特效_Nuke Studio 12(影視特效合成軟件)中文版分享

Nuke 12是一款功能強大&#xff0c;世界知名的影視后期特效合成軟件。NUKE是一個獲得學院獎(Academy Award)的數碼合成軟件。已經經過10年的歷練&#xff0c;為藝術家們提供了創造具有高質素的相片效果的圖像的方法。NUKE無需專門的硬件平臺&#xff0c;但卻能為藝術家提供組合…

c ++ 鏈表_C ++程序查找兩個單個鏈表的并集

c 鏈表Problem statement: Write a C program to find the union of two single linked lists. 問題陳述&#xff1a;編寫一個C 程序來查找兩個單個鏈表的并集。 Example: 例&#xff1a; Let the first linked list be:5->4->3->6->1->NULLLet the second l…

精華版線段樹模板

哈哈哈&#xff0c;打了一上午。。。#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> using namespace std; typedef long long ll; ll a[10000010]; ll lazy[1000000]; …

【轉】unity地形插件T4M使用幫助

unity的地形系統在手機游戲中因為效率問題基本無法使用&#xff0c;只能通過T4M這個地形插件來進行優化制作。下面大概講解一下使用流程及方法。 先中U3D里面用自帶的地形系統刷出想要的地形和貼圖。貼圖可以大概刷一下。后面要重新刷。 用導出腳本ExportTerrain.js導出地形為O…

ansys添加力矩_ANSYS軟件中施加扭矩的方法

ANSYS軟件中施加扭矩的方法胡意立&#xff0c;孫明禮&#xff0c;沈燕青&#xff0c;周佳杰&#xff0c;胡林強【摘要】在機械結構的有限元分析中&#xff0c;常會遇到施加扭矩的問題。文中探討了在ANSYS軟件中施加扭矩的一種方法&#xff0c;以在一個六棱柱一端施加扭矩為實例…

Python | 程序從列表中刪除重復的元素

Example: 例&#xff1a; Input:list1: [10, 20, 10, 20, 30, 40, 30, 50]Output:List after removing duplicate elementslist2: [10, 20, 30, 40, 50]Logic: 邏輯&#xff1a; To implement the program is too easy, we have to append elements one by one to another…

Linux的簡介與虛擬機的管理

Linux的簡介&#xff1a; 嚴格的來講&#xff0c;Linux不算是一個操作系統&#xff0c;只是一個Linux系統中的內核&#xff0c;Linux的全稱是GUN/Linux&#xff0c;這才算是一個真正意義上的Linux系統。 Linux是一個多用戶多任務的操作系統&#xff0c;擁有良好的用戶界面&…

python遞歸查找_Python程序使用遞歸查找數字的冪

python遞歸查找Given the base x and the power y and we have to find the x to the power y using recursion in Python. 給定基數x和冪y &#xff0c;我們必須使用Python中的遞歸找到x到冪y 。 By using recursion – We will be multiplying a number (initially with val…

phalapi可以依賴注入么_PHP 依賴注入

通常調用一個類里面的方法需要如何操作&#xff1a;$class new class();$class->fun()依賴注入模式用來減少程序間的耦合依賴注入共有三種模式&#xff1a;setter 方法注入著重說下setter方法注入并結合ArrayAccess/*** Class Di* property People*/class Di implements Ar…

R語言:ggplot2精細化繪圖——以實用商業化圖表繪圖為例(轉)

本文旨在介紹R語言中ggplot2包的一些精細化操作&#xff0c;主要適用于對R畫圖有一定了解&#xff0c;需要更精細化作圖的人&#xff0c;尤其是那些剛從excel轉ggplot2的各位&#xff0c;有比較頻繁的作圖需求的人。不討論那些樣式非常酷炫的圖表&#xff0c;以實用的商業化圖表…