data types Flashcards

(9 cards)

1
Q

how do you store data like names and age

A

using a string line

string phrase = “aaddfff”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how do you store single characters

A

char ANS = ‘a’;

needs single quotation marks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how to store numbers

A

int ANS = 20;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how do you store exact numbers

A

decimal ANS = 20.1;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how to store decimal numbers but not accurately

A

double ANS = 3.3;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how do you make true or false statements

A

using a bool function

bool ANS = true/false;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

when working with strings how do you make the program put the text on a new line

A

\n after the last word of a sentence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how do you add a string onto another string

A

cancatination + string +

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to find how many characters are inside of a string

A

by using the method Length

console.WriteLine (ANS.Length );

How well did you know this?
1
Not at all
2
3
4
5
Perfectly