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.mzph.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;以实用的商业化图表…