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 question bank holds over 900 C programming questions, and they concentrate on a predictable set of concepts.
Because these papers are objective, every C item has to fit into a short snippet and four options. That shapes what gets asked: what a line prints, what a term means, which loop always runs at least once. Write-a-program work does not appear, and the wrong option is usually the one you land on by guessing instead of tracing. The same paper also asks the CS core, operating systems, DBMS and networking, alongside the fundamentals in ICT for teaching exams, so C is a section to bank quickly rather than dwell on.
Data types and variables in C
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.
C operators and precedence
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. So with i at 5, printf("%d", i++) prints 5 and leaves i at 6; starting again from 5, printf("%d", ++i) prints 6.
Precedence settles what binds first when one line mixes operators: unary (!, ++, --) first, then *, / and %, then + and -, then the relational operators, then == and !=, then &&, then ||, and assignment last. So 2 + 3 * 4 is 14, not 20, and x = 2 + 3 > 4 adds first, compares 5 with 4, and assigns 1 to x. Anywhere you would have to stop and recall that order, put in brackets instead.
Control flow in C
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 in C
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, the address of the variable itself, and change the value through it.
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 in C
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.
![Array a[5] holding 12, 24, 36, 48 and 60 at indices 0 to 4, with a marking the base address at index 0.](https://kgai.blob.core.windows.net/blog-assets/blog_asset_1784038585581_wefvi3.jpg)
Pointers in C
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 in C
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.
How many C questions a paper carries, and how it marks them, differs across DSSSB, KVS, NVS and the state boards, so read that off the recruiting body's own notification before you plan your time on the paper. The concepts do not move between those papers, which is why they are worth drilling once and properly. The DSSSB TGT Computer Science bundle sequences C with the rest of the Delhi syllabus.
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 government teaching jobs category collects the rest of the preparation. Learn the traps cold, and C turns into the most dependable section on the paper.




