data types Flashcards

1
Q

int

A

stores integers

%d

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

float

A

stores decimal numbers to about 6 digits of precision

%f

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

double

A

stores decimal numbers to about 15 digits of precision
%lf

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

long (int)

A

stores big integers (the int is optional)
ex: 123456

%l

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

long double

A

stores big decimal numbers to about 19 digits of precision

%Lf

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

char

A

stores a single character, enclosed within single quotes

%c

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

string (and syntax)

A

an array of chars that allow for the formation of words
ex: char name[] = “boobaa”;

%s

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

void

A

stores no value

no format specifier

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

format specifiers

A

used to hold user input to a variable or display the value of a variable in a string

each data type has its own

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