Karnataka KSEAB SSLC JTS Programming in ANSI C study materials
Karnataka KSEAB SSLC JTS Programming in ANSI C study resources

Karnataka KSEAB SSLC JTS Programming in ANSI C key terms

Karnataka KSEAB SSLC JTS Programming in ANSI C · Get comfortable with the vocabulary.

token

The smallest individual unit of a C program that the compiler recognises, such as a keyword, identifier, constant, string literal, operator, or punctuation mark. The compiler scans source text and splits it into tokens before parsing.

Related: identifier, keyword, preprocessor directive
identifier

A programmer-chosen name for a variable, function, or other entity, formed from letters, digits, and the underscore, never starting with a digit, and not matching any keyword. Identifiers are case-sensitive in C.

Related: keyword, variable, scope
keyword

A word reserved by the C language with a fixed meaning, such as int, if, while, return, or struct. Keywords cannot be reused as identifiers and are written in lowercase.

Related: identifier, data type
data type

A specification of what kind of values a variable can hold and how much storage it needs, for example int, float, char, or double. It also determines which operations are valid on the value.

Related: variable, declaration, type conversion
declaration

A statement that introduces a name and its type to the compiler before use, optionally with an initial value. A definition also reserves storage, whereas a declaration alone may only announce an existing entity.

Related: variable, function prototype, storage class
constant

A value fixed at compile time that cannot be changed during execution, written as a literal such as 25, 3.14, 'A', or "hello". Named constants are often created with const or #define.

Related: variable, preprocessor directive, enumerated type
variable

A named storage location whose value can change while the program runs. Each variable has a type, a name, a memory address, and a lifetime determined by where it is declared.

Related: declaration, storage class, scope
type conversion

Changing a value from one data type to another, either implicitly by the compiler when types are mixed in an expression, or explicitly by the programmer with a cast such as (float) n. Narrowing conversions may lose data.

Related: data type, operator precedence, integer division
operator precedence

The fixed ranking that decides which operator in an expression is applied first, for example multiplication before addition. Parentheses override the default order and are recommended for clarity.

Related: associativity, type conversion, relational operator
associativity

The rule that fixes the evaluation direction when two operators share the same precedence level, such as left-to-right for subtraction or right-to-left for assignment. It resolves expressions like a - b - c or x = y = 0.

Related: operator precedence, assignment operator
modulus operator

The binary % operator that yields the remainder after integer division, so 17 % 5 gives 2. It applies only to integer operands, and the sign of the result follows the dividend in C.

Related: integer division, arithmetic operator
relational operator

An operator that compares two values and produces 1 for true or 0 for false, namely <, <=, >, and >=. Equality checks use the separate == and != operators and are often confused with assignment.

Related: logical operator, operator precedence
logical operator

One of &&, ||, and !, used to combine or negate conditions. They treat any nonzero value as true, return 1 or 0, and short-circuit so the right operand may not be evaluated.

Related: relational operator, bitwise operator, short-circuit evaluation
bitwise operator

An operator that works on the individual bits of integer operands: &, |, ^, ~, <<, and >>. These differ from logical operators because they do not short-circuit and act on every bit position.

Related: logical operator, masking, type conversion
increment operator

The unary ++ operator that adds one to its operand. In prefix form (++n) the value is increased before use; in postfix form (n++) the old value is used in the expression and then increased.

Related: decrement operator, side effect, assignment operator
assignment operator

The = operator that stores the right-hand value into the left-hand variable, plus compound forms such as +=, -=, *=, and /= that combine an arithmetic operation with assignment. It is not a comparison.

Related: increment operator, relational operator, operator precedence
switch statement

A multi-way selection statement that compares one integer or character expression against constant case labels and jumps to the matching one. Execution falls through to later cases unless break is used.

Related: break statement, default label, if-else statement
break statement

A jump statement that immediately exits the innermost enclosing loop or switch. Inside a switch it prevents fall-through into the following cases.

Related: continue statement, switch statement, loop
continue statement

A jump statement that skips the remaining statements of the current loop iteration and begins the next one. In a for loop the update expression still executes before the next test.

Related: break statement, loop, goto statement
loop

A control structure that repeats a block of statements: for is used when the count is known, while tests before each iteration, and do-while tests after, guaranteeing at least one execution.

Related: continue statement, break statement, sentinel value
goto statement

An unconditional jump to a labelled statement inside the same function. It is discouraged in structured programming because it obscures control flow, though it is sometimes used to exit deeply nested loops.

Related: continue statement, loop, flowchart
function prototype

A declaration that tells the compiler a function's name, return type, and parameter types before the function is defined or called. It lets the compiler check argument counts and types.

Related: function definition, parameter, return value
parameter

A variable listed in a function's definition that receives a copy of the value supplied by the caller, called an argument. In C, parameters are passed by value unless a pointer is used.

Related: function prototype, pass by value, pass by reference
return value

The single value a function sends back to its caller through the return statement, whose type must match the declared return type. A function returning void sends nothing back.

Related: function prototype, recursion, storage class
recursion

A technique in which a function calls itself with a smaller or simpler input, requiring a base case that stops the chain. Each pending call keeps its own copy of local variables on the stack.

Related: return value, stack frame, scope
scope

The region of a program in which a declared name is visible and can be used. Block scope covers a compound statement, function scope covers a whole function, and file scope covers the whole source file.

Related: storage class, variable, identifier
storage class

A specifier such as auto, register, static, or extern that controls a variable's lifetime, visibility, and initial value. static keeps a local variable alive across calls; extern refers to an object defined elsewhere.

Related: scope, declaration, variable
array

A collection of a fixed number of elements of the same type stored in consecutive memory locations and accessed by an index starting at 0. The array name usually decays to a pointer to its first element.

Related: two-dimensional array, string, pointer arithmetic
string

A sequence of characters stored in a char array and terminated by the null character '\0'. Standard functions such as strlen and strcpy rely on that terminator to find the end of the string.

Related: array, string handling function, pointer
string handling function

A library routine declared in string.h that operates on null-terminated strings, for example strlen, strcpy, strcat, strcmp, and strstr. Include the header before calling them.

Related: string, header file, array
pointer

A variable that stores the memory address of another object. Pointers must be declared with the type they point to, and the * operator dereferences them to reach the stored value.

Related: pointer arithmetic, address-of operator, dynamic memory allocation
pointer arithmetic

Arithmetic performed on pointers, where adding 1 advances by the size of the pointed-to type rather than one byte. Subtracting two pointers in the same array yields the number of elements between them.

Related: pointer, array, pass by reference
pass by reference

A calling style in C simulated by passing a pointer, so the function can modify the caller's variable through dereferencing. C itself passes all arguments by value, including pointer values.

Related: pass by value, pointer, parameter
dynamic memory allocation

Reserving memory at run time from the heap with malloc, calloc, or realloc, and releasing it with free. The programmer, not the compiler, is responsible for freeing it to avoid leaks.

Related: pointer, memory leak, structure
structure

A user-defined type that groups named members, possibly of different types, under one name. Members are accessed with the dot operator, or with -> through a pointer to a structure.

Related: union, typedef, enumerated type
union

A user-defined type whose members share the same memory area, so only one member holds a valid value at a time. Its size equals the size of its largest member.

Related: structure, typedef
enumerated type

A user-defined type declared with enum that gives names to a set of integer constants, improving readability. The first name is 0 by default and each later name increases by one.

Related: typedef, constant, structure
typedef

A keyword that creates a new name, an alias, for an existing type without creating a new type. It is commonly used to shorten structure declarations and to name pointer types clearly.

Related: structure, union, enumerated type
format specifier

The conversion code in a printf or scanf format string, such as %d for int, %f for float, %c for char, and %s for string. Type and specifier must match or the output or input is wrong.

Related: printf function, scanf function, file pointer
file pointer

A value of type FILE * returned by fopen that identifies an open stream and its position. It is passed to functions such as fgetc, fputs, and fclose, and NULL signals a failed open.

Related: fopen function, format specifier, end-of-file
preprocessor directive

A line beginning with # that is handled before compilation, such as #include, #define, and #ifdef. These lines are not C statements and do not end with a semicolon.

Related: header file, macro, constant
macro

A name created with #define that the preprocessor replaces textually before compilation. Because substitution is textual, macros should parenthesise their parameters to avoid precedence errors.

Related: preprocessor directive, header file, operator precedence
header file

A file with a .h extension included with #include that supplies declarations for library or user functions, such as stdio.h and string.h. Including it lets the compiler check calls.

Related: preprocessor directive, string handling function, function prototype
algorithm

A finite, ordered set of unambiguous steps that solves a problem and produces a result. It is written before coding and may be expressed in pseudocode or as a flowchart.

Related: flowchart, pseudocode, debugging
flowchart

A diagram of an algorithm using standard symbols: an oval for start and stop, a parallelogram for input or output, a rectangle for a process, and a diamond for a decision. Arrows show the order of execution.

Related: algorithm, pseudocode, loop
debugging

The process of locating and correcting errors in a program, whether syntax errors reported by the compiler, run-time errors such as division by zero, or logic errors that give wrong but valid results.

Related: algorithm, compilation, flowchart
compilation

Translating source code into machine code by preprocessing, compiling, assembling, and linking. The compiler reports syntax errors, while the linker resolves references to library and external functions.

Related: preprocessor directive, debugging, header file