Week 2 - Types, Variables, and Functions Flashcards

1
Q

how many bytes is a float?

A

4

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

how many bytes is an unsigned int?

A

4

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

how many bytes is VOID?

A

1

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

how many bytes is a char?

A

1

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

how many bytes is an int?

A

4

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

what is the variable if no storage class is specified?

A

automatic

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

What do all C programs have?

A

functions and variables

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

what is a if :

a = (4/3 + 5/3) * 1.5

A

3

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

define a function

A

a set of statements that specify operations to be performed

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

define a variable

A

a location in storage with a storage class and type

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

define automatic

A

discarded outside the block

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

define static

A

external to all blocks

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

What is the format of a function definition?

A

return_type f(arguments) {…}

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

What is the format of a variable declaration?

A

variable_type variable_name = variable_value;

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

how do you declare an array of 10 integers?

A

int a[10];

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

how do you declare a string?

A

char[] = “hello world!”;