Placement Prep

10 Technical Interview Aptitude Questions: A Solved Set

Ten solved technical and aptitude questions for campus placement: C programming, number series, speed problems, coding-decoding, and data structures.

By FACE Prep Team 9 min read
technical-interview aptitude c-programming placement-prep data-structures number-series campus-placement

Technical rounds at campus placement drives test three things: your grasp of core programming concepts, your speed on aptitude problems, and your ability to reason through data structure questions under time pressure.

This is a solved set of 10 questions from those three areas. Each question has a worked answer. The questions draw from the most repeated topics in Indian placement drives: C programming fundamentals, quantitative aptitude number patterns, and basic data structures. Work through them in order, check your thinking against the worked answers, and note the concepts that need another round of practice.

How Technical Rounds Are Structured at Campus Drives

The exact format varies by company, but the broad pattern is consistent enough to be useful:

Company tierTechnical round formatTypical durationMix
IT services (TCS, Infosys, Wipro, Cognizant)Online MCQ + coding section90 to 120 minutes60% aptitude + 40% technical MCQ + 1-2 coding problems
Mid-size IT / product companiesCombined written test60 to 90 minutes50% technical MCQ + 50% aptitude
Core engineering companiesDomain-specific written test60 minutes80% technical + 20% quantitative

Within the technical MCQ section, three topic clusters dominate at the IT services tier: programming language fundamentals (mostly C, Java, or Python depending on the company), basic data structures and algorithm complexity, and output prediction (trace what this code prints).

The quantitative aptitude component within a technical round typically covers number series, speed-distance-time, probability basics, and coding-decoding. These are the same topics that appear in a standard aptitude round; companies include them in the technical paper to test whether a candidate can switch mental gears between abstract reasoning and code tracing within the same session.

Five C Programming and CS Fundamentals Questions

Q1: Pre-increment and post-increment in C

Consider this code snippet:

int x = 5;
int y = x++;

What are the values of x and y after execution?

  • Answer: y = 5, x = 6.
  • Step 1: x++ is post-increment. The current value of x (which is 5) is assigned to y first.
  • Step 2: After the assignment, x is incremented by 1. So x becomes 6.
  • Contrast: If the code were int y = ++x;, the increment happens first. x becomes 6, then y is assigned 6. Both x and y would be 6.
  • Rule: Post-increment (x++) — use then increment. Pre-increment (++x) — increment then use.
  • Reference: C arithmetic operators — cppreference.com

Q2: Assignment operator vs equality operator

What is the difference between = and == in C?

  • Answer: = is the assignment operator; == is the equality comparison operator.
  • x = 10 assigns the value 10 to the variable x. After this statement, x holds 10.
  • x == 10 evaluates to 1 (true) if x equals 10, and 0 (false) if it does not. It does not change the value of x.
  • Common bug: Writing if (x = 10) instead of if (x == 10) is a valid C statement that always evaluates to true (because the assignment expression x = 10 has value 10, which is non-zero). The compiler may warn, but it compiles and runs, silently doing the wrong thing.

Q3: The null terminator in C

What does the \0 character do in a C string? Why does it matter for functions like strlen()?

  • Answer: \0 is the null terminator. It marks the end of a character string stored in a char array.
  • How it works: A C string like "FACE" is stored in memory as five bytes: 'F', 'A', 'C', 'E', '\0'. The \0 byte signals to any string function that the string ends here.
  • Why strlen() needs it: strlen() starts at the first character of the array and increments a counter for every character it finds that is not \0. When it hits \0, it returns the count. Without it, the function reads past the intended end of the string into whatever memory follows.
  • Null character vs null pointer: \0 is a character with value 0. A null pointer (NULL) is a pointer set to address 0. Different concepts; don’t conflate them in answers.

Q4: Which relational operator is invalid in C?

Which of the following is not a valid operator in C: >=, <=, <>, ==?

  • Answer: <> is not a valid C operator.
  • Why: In C, the not-equal-to operator is !=. The <> notation is used in Pascal, SQL, and some other languages but not in C.
  • Valid relational operators in C:
OperatorMeaning
==Equal to
!=Not equal to
>Greater than
<Less than
>=Greater than or equal to
<=Less than or equal to

Q5: Can int store the value 32768?

A function written for a 16-bit system uses int to store a count. Can it store the value 32768?

  • Answer: No, not on a 16-bit system. On modern 32-bit or 64-bit systems, yes.
  • 16-bit int: On systems where int is 2 bytes (16 bits), the range is -32768 to 32767. The value 32768 is exactly one above the maximum; it overflows and wraps to -32768 on a signed int.
  • Alternatives on 16-bit: Use unsigned int (range 0 to 65535) if negative values are not needed, or long int for a wider signed range.
  • Modern systems: Most current compilers on 32-bit and 64-bit machines define int as 4 bytes (32 bits), giving a range of -2,147,483,648 to 2,147,483,647. On these systems, 32768 fits with no issue.
  • Safe practice: Use sizeof(int) to check the actual size at runtime, or use <stdint.h> types like int32_t when a specific width is required.

Three Quantitative Aptitude Questions

These appear in the aptitude component of technical placement rounds. Format every answer as a step-by-step calculation.

Q6: Number series — find the next term

What comes next in this series: 2, 6, 12, 20, 30, ?

  • Answer: 42
  • Step 1: Calculate the first differences: 6-2=4, 12-6=6, 20-12=8, 30-20=10. The differences are 4, 6, 8, 10.
  • Step 2: Calculate the second differences: 6-4=2, 8-6=2, 10-8=2. Second differences are constant at 2, which signals a quadratic pattern.
  • Step 3: Identify the formula. The terms match n times (n+1): for n=1, 1 times 2 equals 2; n=2, 2 times 3 equals 6; n=3, 3 times 4 equals 12; n=4, 4 times 5 equals 20; n=5, 5 times 6 equals 30; n=6, 6 times 7 equals 42.
  • Verify: 30 plus 12 equals 42, and the next first difference would be 12, consistent with the arithmetic-progression pattern of the first differences. Confirmed.

Q7: Speed, distance, and time

A train 120 metres long crosses a platform 180 metres long in 30 seconds. What is the speed of the train?

  • Answer: 36 km/h
  • Step 1: Total distance covered = length of train + length of platform = 120 + 180 = 300 metres.
  • Step 2: Speed = distance divided by time = 300 divided by 30 = 10 metres per second.
  • Step 3: Convert to km/h: 10 times (3600 divided by 1000) = 10 times 3.6 = 36 km/h.
  • Key concept: When a train crosses a platform or bridge, the distance the train must travel equals its own length plus the platform’s length. When it crosses just a pole (a point object), the distance is only the train’s own length.

Q8: Coding-decoding

In a certain code, RICE is written as TKEG. Using the same code, how is MILK written?

  • Answer: OKNM
  • Step 1: Find the pattern. R is the 18th letter; T is the 20th letter. Difference is +2. Check the rest: I(9) maps to K(11), difference +2. C(3) maps to E(5), difference +2. E(5) maps to G(7), difference +2. Pattern confirmed: each letter shifts forward by 2 positions in the alphabet.
  • Step 2: Apply to MILK. M(13)+2 = O(15). I(9)+2 = K(11). L(12)+2 = N(14). K(11)+2 = M(13).
  • Result: MILK maps to OKNM.
  • Tip: Always verify the pattern with every letter in the given word before applying. A pattern that holds for two letters but breaks on the third is a cue that the rule is positional (odd positions shift one way, even positions another), not uniform.

For practice with the full range of types of critical reasoning questions including coding-decoding, syllogisms, and blood relations, that article covers the category taxonomy and example questions from each type.

Two Logical Reasoning and Data Structures Questions

Q9: Stack vs queue — practical usage

A web browser maintains a back-navigation history. You press Back to return to previously visited pages. Which data structure fits this behaviour?

  • Answer: Stack
  • Stack (LIFO — Last In, First Out): The most recently visited page is the one you return to first when you press Back. That is LIFO behaviour. Push each new URL onto the stack when you navigate; pop from the stack when you press Back.
  • Queue (FIFO — First In, First Out): The opposite order — the oldest item comes out first. A queue models waiting lines: print spoolers, message queues, customer service tickets.
  • Contrast scenario: A printer queue uses a Queue. The first document sent to the printer prints first. A browser back button uses a Stack. The last page visited is the first one you return to.

Q10: Code output — loop pattern

What does the following C code print?

for (int a = 1; a <= 5; a++) {
    for (int b = 1; b <= a; b++)
        printf("%d", b);
    printf("\n");
}
  • Answer:
    1
    12
    123
    1234
    12345
  • Step 1: Outer loop runs with a from 1 to 5.
  • Step 2: For each value of a, the inner loop runs with b from 1 to a, printing b without a space or separator.
  • Step 3: After the inner loop finishes for a given a, a newline character is printed.
  • Trace: When a=1, inner loop runs once and prints “1”. When a=2, inner loop runs twice and prints “12”. The same logic continues through a=5.
  • Variation to expect: Interviewers sometimes flip the inner loop to start from a and count down, or ask for stars instead of digits. Trace the same way — follow b’s range and what gets printed at each step.

How to Build an Effective Practice Routine

A solved set like this one is most useful as a diagnostic tool, not a score card. The goal is not to confirm what you already know. It is to surface the concepts you cannot currently work through without checking notes.

A repeatable practice routine that works across all three question types covered here:

  1. Time-box each question. Give yourself 2 minutes per multiple-choice question and 4 minutes per worked-example question. Mark any question you cannot complete within the time box and move on.
  2. Do not check answers mid-attempt. Complete all 10 questions, then review. Mid-attempt answer-checking short-circuits the retrieval process that makes practice effective.
  3. Classify your errors. For every wrong answer, decide: was it a concept gap (you did not know the rule), a process gap (you knew the rule but misapplied it), or a careless error (you knew the rule and applied it correctly but made an arithmetic slip)? Different errors need different fixes.
  4. Rotate question sets. One set of 10 is not a preparation strategy. The pattern is: complete a set, classify errors, spend one session on the weak concept, then attempt a new set from a different source. The campus recruitment day guide has a practical template for how to structure the 72 hours before a placement drive.
  5. Return to flagged questions. Questions you could not complete in the time box go into a re-attempt queue. Come back to them 24 hours later without looking at the answer key first.

The split that works for most engineering students in the 6 to 8 weeks before placement season: 3 sessions per week on aptitude (number series, ratios, speed-distance-time), 2 sessions on programming fundamentals (C or the language your target companies test), and 1 session on data structures basics. Adjust based on which error category keeps appearing in your practice logs.


The problem-solving discipline behind Q6’s n(n+1) pattern (spot the second-difference structure, name the rule, verify against every term) is the same loop that makes someone effective with AI tools: identify the structure, apply the rule, check the output. If you want to test that transfer in a live LLM environment rather than waiting until you’re placed, TinkerLLM is ₹299 to try. The same reasoning skills that crack a placement aptitude set apply directly to getting useful responses out of a language model on the first attempt.

Primary sources

Frequently asked questions

What is the difference between a technical round and an aptitude round in campus placement?

In most Indian campus placement drives, both aptitude and technical questions appear together in an online test. The aptitude section covers quantitative reasoning, number series, and logical deduction. The technical section tests programming fundamentals, data structures, and CS concepts. Some companies like TCS and Infosys separate the two into distinct modules; others combine them into a single 90-minute paper.

What C operators are most commonly asked in placement technical papers?

Increment and decrement operators (++ and --), the assignment operator (=) versus the equality operator (==), relational operators (>=, <=, !=), and escape sequences (\n, \t, \0) come up repeatedly in technical papers at TCS, Infosys, Wipro, and Cognizant. Knowing the difference between pre-increment and post-increment is especially important.

What is the difference between pre-increment and post-increment in C?

Pre-increment (++x) increments the variable first, then uses the new value in the expression. Post-increment (x++) uses the current value in the expression first, then increments. If x=5, then y=++x gives y=6 and x=6. If x=5, then y=x++ gives y=5 and x=6.

What is the null terminator used for in C strings?

The null terminator (\0) marks the end of a character string in C. Functions like printf(), strlen(), and strcpy() scan characters one by one until they find \0 to know where the string ends. Without it, the function would read past the intended end of the string and access random memory.

What is the n(n+1) number series pattern used for in aptitude tests?

The n(n+1) pattern produces the sequence 2, 6, 12, 20, 30, 42 for n=1 to 6. It appears frequently in number series aptitude questions because the second differences (the differences of the differences) are constant at 2. When you spot constant second differences in a series, look for an n-squared pattern with a linear adjustment — n(n+1) is the simplest form.

What data structures questions typically appear in fresher technical interviews?

Stack and queue usage (which is LIFO and which is FIFO), array versus linked list trade-offs, and basic sorting algorithm complexity (bubble sort is O(n-squared) in the average case) are the most frequent data structures topics at fresher-level interviews. Trees and graphs appear in off-campus and product-company interviews; for IT services, arrays, stacks, and queues are the core focus.

Build AI projects

A self-paced playground for building with LLMs.

TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.

Try TinkerLLM (₹299 launch)
Free AI Roadmap PDF