stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
C# - Programming Concepts Flashcards | StudBud
Explore
/
C# - Programming Concepts
C# - Programming Concepts
15 terms
·
StudBud Administration
·
18 plays
Basic C#
Flashcards
15 cards
F
Practice quiz
P
Host live
L
Questions
15
Answers
1
Error in this
True
False
2
Which operator can be used to compare two values?
<>
><
==
=
3
How do you insert single-line COMMENTS in C# code?
/* this is a comment
/* this is a comment */
# this is a comment
// this is a comment
4
Which property can be used to find the length of a string?
Length
length
getLength()
length ()
5
What is a correct syntax to output "Hello World" in C#?
Console.WriteLine("Hello World");
console.WriteLine("Hello World");
Console.Writeline("Hello World");
Console.writeLine("Hello World");
6
Converts the string data type into another data type. It returns 0 if the conversion fails.
Convert.ToString()
TryParse() method
Parse() method
Convert. ToInt32()
7
bool stores true or false values
True
False
8
What is a correct syntax to input "Hello World" in C#?
console.ReadLine();
Console.readLine();
Console.ReadLine()();
Console.Readline();
9
Which data type is used to create a variable that should store text?
Txt
myString
str
string
10
Which operator is used to add together two values?
The & sign
The * sign
The / sign
The + sign
11
Type casting is when you assign a value of one data type to another type.
False
True
12
How do you create a variable with the numeric value 5?
double x= 5 ;
int x=5;
num x = 5;
x=5;
13
What is the temperature outside? 45
it is a hot day
Print Error
You did not enter the integer Value
it is a cool day
14
How do you create a variable with the floating number 2.8?
double x=2.8D;
byte x = 2.8;
int x=2.8;
int x=2.8D;
15
The value of a string variable can be surrounded by single quotes.
True
False