The C Programming Language - Compiling; Data Types; Identifier Naming Flashcards

1
Q

Source program/file

A

A sequence of bytes.

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

Byte

A

An 8-bit chunk of data

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

Bit

A

Another name for binary digit - represents a logical value in the form of a numerical - ‘0’ or ‘1’

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

Text file

A

Files that store data in the form of a sequence of ASCII characters

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

Binary file

A

Files that store data in binary form

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

Describe the representation of info in a system

A

All information in a system is represented in the form of bits. However, the context is a key factor in distinguishing between different data objects.

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

object code

A

A sequence of low-level machine-language instructions in binary form

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

Compiler driver/compilation system

A

Software that translates a source file to an object file. It is composed of four programs, namely preprocessor, compiler, assembler, and linker.

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

Define the four phases of the compilation process/name the four programs that make up the compilation system

A

PCAL - preprocess, compile, assemble, link

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

Define the preprocessing phase of the compilation process/the function of the preprocessor program

A

The preprocessor (ccp) modifies the original source code/.c file by following directives that begin with the ‘#’ character (#include, #define for e.g.) and removing comments. This typically results in the C program being converted into a .i file

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

.i file

A

An output file of the preprocessor

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

Define the function of the #include <header file> directive

A

include instructs the preprocessor to read the contents of the given file into the source program/file/code.

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

Define the compiling phase of the compilation process/the function of the compiler program

A

The compiler (cc1) parses the syntaxes of the preprocessed code (.i file) into an assembly language program/file; it converts the .i file into a .s file.

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

Assembly code

A

A sequence of low-level machine language instructions written in textual form; an intermediary between textual code and machine/binary code; stored in a .s file/program.

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

Define the assembly phase of the compilation process/the function of the assembler program

A

The assembler parses the assembly-language program (.s file) into a relocatable object program/file. It stores the resulting code into a .o file. The assembly code is converted into object code, i.e. low-level machine language instructions in binary form.

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

Define the linking phase of the compilation process/the function of the linker program

A

The linker merges any precompiled object files resulting from any C library functions in the relocatable object file (.o) to generate an executable object file/executable that can be loaded into the computer memory and executed by the system.