General C Flashcards

1
Q

What does the C preprocessor do

A

The preprocessor makes modifications to the source code before compilation

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

What does the C linker do

A

Combines object code produced by the compiler with additional code needed from the C standard library and makes an executable program

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

What are C statements

A

Commands that are to be executed when the program is run

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

What are C tokens

A

The punctuation of the C programming language

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

What is the command to compile a C program

A

gcc source_code.c

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

What is a C macro

A

A fragment of code which has been given a name and whenever that name is used, it is replaced by the contents of the macro during preprocessing

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

GCC compile switch: -o

A

-o allows you to choose the name of the executable file compiled by the C compiler

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

What is a C syntax error

A

Violations of the language

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

Where does program execution begin in a C program

A

At the main function

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

What is the string in the C printf function called

A

A format string

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

What does the C compiler do

A

Preprocesses the source code, generates error messages, takes your source code and compiles it to object code

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

What is a C string literal

A

A series of character enclosed in double quotation marks

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

What are C comments used for

A

To document programs and improve readability

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

What is the file extension of a C source code file

A

.c

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

What are the three steps to create a C executable

A

Preprocess, compile and link

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

What is a C semantic error

A

Errors in meaning

17
Q

What is the file extension of a C object code file

A

.o

18
Q

What is the file extension of a C header file

A

.h

19
Q

What type of statements do not require a statement terminator

A

Preprocessor directives, comments and function headers

20
Q

What is the C keyboard buffer

A

Memory that is used by the operating system to store input characters from the keyboard

21
Q

What is the C program execution stack

A

When a program calls a function, the called function must know how to return to its caller, so the return address of the calling function is pushed onto the program execution stack

22
Q

What is the C activation record

A

The program execution containing the memory for the local variables used in each invocation of a function during a program’s execution

23
Q

What are C strings created out of

A

Character arrays

24
Q

What is used to indicate the end of a C string

A

\0’ null

25
Q

How is a string stored in a C program

A

In an array of type char and each character is placed in one cell of the array