C Programming Language Flashcards

1
Q

Functional Prototypes

A

Functions need to be defined before “main()” function

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

Function arguments work how?

A

In C, all function arguments are passed “by value”

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

Meaning of Passed “By Value”?

A

The called function is given the values of its arguments in temporary variables rather than the originals

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

Passed “By Value” Is different than other languages, how?

A

“Call by reference” - that allows the called routine to get the originals, not the copies

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

Called by value - is?

A

An asset, not a liability

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

C - Function Variables

A

(passed by) Value - copy ( not originals - a temporary copy )

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

It is possible for (C) - to reference a variable directly, How?

A

The caller must provide the address of the variable to be set. Technically a pointer to said variable

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

in C - Arrays - are different, How?

A

They are always referenced by originals

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

Local Variables, are?

A

Automatic Variables

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

Local Vs. External - variables?

A

Alternative to ‘local’ variable - is ‘external’ variable

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

Condition of External Variables

A

If the definition of an external variable occurs in the source file before its use in a particular function, then there is no need for an ‘extern’ declaration in the function

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

“Definition”

A

Refers to the place where the variable is created or assigned storage

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

“Declaration”

A

Refers to the place where the nature of the variable is stated but no storage is allocated

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

variable habit?

A

There is a tendency to use variables for everything!

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

variable - caution:

A

But extern variables are there - even when you don’t want them

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

Variable in C - To get direct access?:

A

point - directly to the variable

17
Q

Enumerations

A
  • Takes variables already declared within enum declaration and allows you to choose one variable in enum list
  • Or map your way through all variables declared when enum was defined
  • If undefined - the list follows index++