You are on page 1of 5

Glossary of C terms.

Address. Reference to a memory location. In C pointers are used to hold addresses. ANSI American API Application Programming Interface Argument. A value passed to a function (see parameter). Base Class See C glossary. Bloc!. A se"uence of definitions# declarations and statements# enclosed $ithin %races &'. Character Array. A set of elements of type char. (Can %e used to store a string). Class See C glossary. Compilation error. (rror $hich occurs during the translation of source code into machine code. Compiler. A program $hich converts source code into machine code. Compound Statement. A se"uence of simple statements. Constant (common all garden) An item that represents a value that cannot %e changed. )or (*ample+
123 'x'

Constant (sym%olic) A sym%ol defined in a ,define preprocessor directive to represent a constant value. -ata type. -efinition of the data. int, char, float. -eclaration. A construct $hich associates attri%utes to a varia%le name or function. No storage is reserved.

)or e*ample+
extrn int a; extrn char c;

varia%le declaration A structure decleration could loo! li!e+


struct per_rec { int age; char *surname; char *firstname; };

-efinition. .. /aria%le definition is a declaration $ith storage allocation.


2. 3. 4. int a; char c; struct per_rec person;

0. A construct $hich specifies the name#parameters and return type of a function. )or e*ample a function definition $ould %e+
6. ". #. $. long sqr int num! { return num*num!; }

-erived Class See C glossary. (ncapsulation. 1he C concept of grouping related varia%les and controlling the operations performed apon them. 1he encapsulated varia%les can %e considered to %e contained in their o$n environment. (scape se"uence. Control codes comprising com%inations of a %ac!slash follo$ed %y letters or digits $hich represent non printing characters. (*ecuta%le program. Program $hich $ill run in the environment of the operating system or $ithin an appropriate run time environment. (*ecuta%le (stand2alone) program. Program $hich $ill run $ithin the environment of the operating system $ithout additional utilities or support. (*pression. A se"uence of operators and operands $hich may yield a single value. )ile. -ata stored as an electronic file. )ile descriptor.

1his is used in lo$ level I34 (open3read3$rite3close functions) to identify a file. It is an integer num%er assigned to a file name %y open and then used as a uni"ue identifier %y read3$rite and close. )loating2point Num%er. Num%er having a decimal place or e*ponent. )ormat specification. A string $hich controls ho$ input or output shall %e presented. Identifier. 1he names used to refer to stored data values such as constants, variables or functions. Integer. A num%er $ithout a fractional part. 5ey$ord. A $ord $hich has a predefined meaning to a 6C6 compiler and therefore must not %e used for any other purpose. li%rary file. 1he file $hich contains compiled versions of commonly used functions $hich can %e lin!ed to an o%7ect file to ma!e an e*ecuta%le program. 8i%rary function. A function $hose code is contained in the e*ternal library file. 8ine. 4ne line of input from the standard input device (!ey%oard) $hich is terminated $ith a ne$line character. 1he ne$line character is replaced %y a null character. 8iteral. Characters# letters or strings $hich are to %e ta!en literally and used as constants rather than identifiers. 9ethod. C tal! meaning a mem%er function of a class. 4%7ect See C glossary. 4%7ect Code. Code $hich is directly understanda%le %y the machine (machine code). 4perand. An e*pression acted on %y an operator. )or e*ample+
% & a ' (;

a and b are %oth operands of the + operator. Parameter. A value received %y a function. Pointer. /aria%le containing an address.

Polymorphism See C glossary. P4SI: Porta%le 4perating System Interface. Precedence (of operators) 1he order in $hich operators are dealt $ith during the evaluation of an e*pression. Preprocessor. A processor $hich manipulates the initial directives of the source file $hich contains instructions a%out ho$ the source file shall %e processed and compiled. Preprocessor directive. Source file instruction a%out ho$ the file shall %e processed and compiled. Program. A te*t file comprising code $hich can %e compiled. Run time error. An error $hich occurs $hen a program is e*ecuted. Reserved $ord. (!ey$ord) A $ord $hich has a predefined meaning to a 6C6 compiler and therefore must not %e used for any other purpose. Scope. Source code. A te*t file comprising code $hich can %e compiled. Statement. A simple statement is an expression follo$ed %y a semicolon. (See compound statement and %loc!). String. A string in 6C6 is an array of characters terminated %y a Null character (6;<6). Su%Class See C glossary. SuperClass See C glossary. Synta* error. A mista!e in the source code $hich prevents the compiler from converting it into o%7ect code. 1hreads. A process has five fundamental parts+ code (=te*t=)# data (/9)# stac!# file I34# and signal ta%les. 1heads are spa$ned from a process and can share these parts to comunicate $ith each other.

1he traditional method of spa$ning processes (for!) could only communicate $ith other for!ed processes via pipes and and =shared memory=. 1he result is threads can communicate easily and have a lo$ CP> overhead. /aria%le. An identifier (and storage) for a data type and for $hich the data value is allo$ed to change as the program runs.
1op 9aster Inde* 5ey$ords )unctions

Martin Leslie

You might also like