問題一覧
1
___ can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
identifiers
2
• are used to assign values to variables
assignment operators
3
To return a value, you can use primitive data types ( such as int or double) instead of void, and use the ___ keyword inside the method.
return
4
converting a larger type to a smaller size type
explicit casting
5
– stores values with two states – such as true or false
bool, boolean
6
This method returns the absolute (positive) value of x.
Math.Abs()
7
This method can be used to find the length of a string.
string length
8
is a programming language
c#
9
can be used to explain C# code, and to make it more readable. It can also be used to prevent execution when testing alternative code.
comments
10
However, you can add the ____ keyword if you don't want others (or yourself) to overwrite existing values.
const
11
Another option of string concatenation, is string __, which substitutes values of variables into placeholders in a string.
interpolation
12
This method returns the square root of x
Math.Sqrt()
13
The latest version, ___, was released in September 2019.
c#8
14
only accessible within the same class
private
15
There are two types of comments:
single-line comments, multi-line comments
16
The first version was released in year
2002
17
__ are used for storing text.
string
18
C# is pronounced as “____".
see-sharp
19
___ is used to output (print) values.
Console.WriteLine()
20
– stores single characters – such as 'a' or ‘B’
char
21
is accessible within the same class, or in a class that is inherited from that class
protected
22
This method can be used to find the smallest value of x and y.
Math.Min()
23
The ___ operator can be used between strings to combine them. This is called concatenation.
+
24
The ___ escape character turns special characters into string characters:
backslash
25
It is an object-oriented programming language created by Microsoft that runs on the .NET Framework.
c#
26
are used to perform operations on variables and values.
operators
27
The + operator can be used between strings to combine them. This is called ___.
concatenation
28
This method will return a copy of string converted to lowercase.
string ToLower
29
– stores text, such as "Hello World".
string
30
are used to compare two values
relational operators
31
__ Comments start with /* and ends with */.start with /* and ends with */.
multi-line
32
accessible for all classes
public
33
The ___ keyword is an access modifier, which is used to set the access level/visibility for classes, fields, methods and properties.
public
34
It is also possible to send arguments with the ___ syntax.
key:value
35
.Net is a CLR. what is clr?
common language runtime
36
To declare more than one variable of the same type, use a ___:
comma-separated list
37
A method is defined with the name of the method, followed by ___
parentheses
38
This method can be used to find the highest value of x and y
Math.Max()
39
The C# ___ class has many methods that allows you to perform mathematical tasks on numbers.
math
40
Different types of variables:
int, double, char, string, bool
41
The ___ keyword, used in the examples above, indicates that the method should not return a value.
void
42
C# has its roots in the C family of languages and will be immediately familiar to
c, c++, java, javascript
43
The latest version, C# 8, was released in ___.
september 2019
44
To create a variable, you must specify the type and assign it a value:
type variableName = value;
45
There are two types of Casting:
implicit casting, explicit casting
46
specifies the size and type of variable values
data type
47
converting a larger type to a smaller size type (also called as narrowing) • double -> float -> long -> int -> char
explicit casting
48
___ is a framework for building applications on Windows
.NET
49
• A ___ variable contains a collection of characters surrounded by double quotes.
string
50
Are used to perform common mathematical operations:
arithmetic operators
51
Combine a text and a variable with the + sign
concatenation
52
__ Comments start with two forward slashes (//)
single-line
53
must be done manually by placing the type in parentheses in front of the value:
explicit casting
54
– stores floating point numbers – with decimals, such as 20.99 or -20.99
double
55
This method will return a copy of string converted to uppercase.
string ToUpper
56
This method rounds a number to the nearest whole number.
Math.Round()
57
C# is used for
vr, mobile applications, desktop applications, web applications, web services, web sites, games, database applications
58
___ is a block of code which only runs when it is called.
method
59
converting a smaller type to a larger type size (also called as widening) • char -> int -> long -> float -> double
implicit casting
60
Also note that you have to use the ___ when using the string interpolation method.
dollar sign
61
The ___ method is often used to display variable values to the console window.
WriteLine()
62
You commonly see the ___ keyword because it appears on different programming languages:
public
63
Types of data types
int, long, float, double, bool, char, string, byte, sbyte, short, uint, ulong, ushort, decimal
64
is done automatically when passing a smaller size type to a larger size type:
implicit casting
65
– stores integers (whole numbers) – without decimals, such as 123 or -123
int
66
___ is used to get the user input
Console.ReadLine()
67
This method raises a number to a specified number.
Math.Pow()
68
are used to determine the logic between variables or values:
logical operators
69
___ containers for storing data values
variables
70
converting a smaller type to a larger type size
implicit casting
71
Methods are used to perform certain actions, and they are also known as ___
functions