C is the language teaching recruitment papers reach for first. It is compact, it exposes memory directly, and it forces you to understand what a program actually does, which is exactly why DSSSB, KVS, NVS, and state TGT and PGT computer papers keep testing it. Our published question bank holds over 900 questions tagged to C programming, and they concentrate on a predictable set of concepts.
This is a teaching walk-through of that set at the depth these papers test: data types, operators, control flow, functions and recursion, arrays, pointers, and structures, finishing with a small pointer-and-array example you can trace by hand. Unlike our other CS subjects, this post has no GATE-side companion; it is the standalone reference at teaching-exam depth.
Data types and variables
Every C variable has a type that fixes what it can hold and how much memory it uses. The basic types are:
int for whole numbers, float and double for real numbers (double carries more precision), char for a single character, and void for "no value".
Modifiers like
short,long,signed, andunsignedadjust range and sign.
A variable is a named box of a given type; a constant never changes after it is set. The exam-favourite trap is that a char in C is really a small integer, so 'A' has the numeric value 65 and can be used in arithmetic. Know that, and character questions stop surprising you.
Operators
Operators combine values. The families you must know:
Arithmetic:
+ - * / %. Remember that/between two integers truncates, so7 / 2is 3, not 3.5, and%gives the remainder, so7 % 2is 1.Relational:
< > <= >= == !=, which yield 1 for true and 0 for false.Logical:
&&,||,!, used to combine conditions.Assignment and increment:
=,+=, and the pre/post forms++iandi++.
The classic question tests pre versus post increment. In i++, the old value is used first and then i increases; in ++i, i increases first and the new value is used. Precedence and this ordering are the two things examiners probe most.
Control flow
Control-flow statements decide which code runs and how often.
Decision:
if,if-else,else-ifladders, andswitchfor selecting among fixed cases.Loops:
forwhen the count is known,whilewhen the condition is checked first, anddo-whilewhich runs the body at least once because it checks the condition after.Jumps:
breakexits a loop,continueskips to the next iteration.
The most tested distinction is while versus do-while: a do-while body always executes once even if the condition is false from the start, while a while body may never run. That single fact answers a whole family of output questions.
Functions and recursion
A function is a named block that takes parameters and can return a value. C passes arguments by value by default, meaning the function gets a copy, so changes to a plain parameter do not affect the caller's variable. To change the caller's data you pass a pointer, which we reach in a moment.
Recursion is a function that calls itself, with a base case that stops it. The standard example is factorial:
int fact(int n) {
if (n <= 1) return 1; // base case
return n * fact(n - 1); // recursive call
}Trace fact(3): it returns 3 * fact(2), which returns 2 * fact(1), which hits the base case and returns 1. Unwinding gives 2 * 1 = 2, then 3 * 2 = 6. Missing or wrong base cases, giving infinite recursion, are a favourite exam error to spot.
Arrays
An array is a fixed-size, contiguous collection of same-type elements, indexed from 0. So int a[5] has valid indices 0 to 4, and a[5] is out of bounds. The name of an array, used on its own, gives the address of its first element, which is the bridge to pointers.
![A five-cell array a[5] drawn as boxes labelled index 0 to 4 with sample values, and an arrow from the label "a" pointing to the index-0 box to show the array name is the base address.](https://kgai.blob.core.windows.net/blog-assets/blog_asset_1784038585581_wefvi3.jpg)
Pointers
A pointer is a variable that stores the address of another variable. Two operators drive them: & gives the address of a variable, and * dereferences a pointer to reach the value it points to.
int x = 10;
int *p = &x; // p holds the address of x
*p = 20; // change x through the pointerAfter this, x is 20, because *p and x name the same memory. Pointers are how C lets a function modify the caller's data (pass &variable), and they are the concept teaching papers use to separate genuine understanding from memorisation.
Structures
A structure groups variables of different types under one name, so related data travels together.
struct Student {
char name[20];
int roll;
float marks;
};You then create variables of type struct Student and reach members with the dot operator, as in s1.roll. Where you hold a pointer to a structure, you use the arrow operator -> instead. Structures are the step from single values to modelling a real record, and papers test the member-access syntax directly.
A worked pointer-and-array example
Arrays and pointers meet in one classic question. Consider:
int a[4] = {10, 20, 30, 40};
int *p = a; // p points to a[0]
printf("%d", *(p + 2));Work it out step by step:
p = amakes p hold the address ofa[0].p + 2moves the pointer forward by two int elements, not two bytes, because pointer arithmetic scales by the type. Sop + 2points toa[2].*(p + 2)reads the value there, which is 30.
The key insight examiners test: *(p + i) is exactly a[i]. Pointer arithmetic counts in elements, so adding 2 to an int * skips two integers. Trace one of these by hand and the array-pointer questions become mechanical.
How C is tested in teaching CS exams
Teaching papers keep C at TGT and PGT depth, which means concept and output-tracing, not large programs:
Output prediction. Given a short snippet with a loop, an increment, or pointer arithmetic, state what prints. The
/truncation,i++versus++i, and*(p + i)are the usual hooks.Definitions and syntax. What a pointer stores, when to use
->versus., what a base case is, which loop always runs once.Error spotting. Out-of-bounds indices, missing base cases, or changing a by-value parameter and expecting the caller to see it.
Every official specific, the number of C questions, the marks, and the exact sectional split, lives in the recruiting body's notification and differs across DSSSB, KVS, and state exams, so confirm it there. The concepts here are stable and are exactly what our C questions drill.
The short version
C for teaching exams is about understanding, not volume: fix the data types, keep / integer-truncation and i++ versus ++i sharp, know that a do-while runs at least once, understand that arrays index from 0 and that *(p + i) equals a[i], and be able to declare and access a structure. Trace one recursion and one pointer snippet by hand until they feel routine.
If you want C sequenced with the rest of the syllabus, the Teaching Recruitment Exams bundle covers programming alongside the CS core, and the DSSSB TGT Computer Science bundle targets the Delhi papers. Pair this with the foundations in ICT for teaching exams, and browse the government teaching jobs category for the full set. Learn the traps cold, and C turns into the most dependable section on the paper.


