issue 117apr 27mmxxvi
est. 2017
Sun, 27 Apr 2026
vol. IX · no. 117
PapersAdda
placement intelligence, since 2017
640+ briefs · 24 campuses · by reservation
verified offers · sourced from r/developersIndia
razorpay₹65.00 LPA· iit-d · sde-1google₹54.00 LPA· iiit-h · swe-imicrosoft₹49.50 LPA· iit-b · sdeatlassian₹38.00 LPA· nit-w · sde-1amazon₹44.20 LPA· bits-p · sde-1uber₹42.00 LPA· iit-kgp · sde-1razorpay₹65.00 LPA· iit-d · sde-1google₹54.00 LPA· iiit-h · swe-imicrosoft₹49.50 LPA· iit-b · sdeatlassian₹38.00 LPA· nit-w · sde-1amazon₹44.20 LPA· bits-p · sde-1uber₹42.00 LPA· iit-kgp · sde-1
section: Uncategorized / placement papers
15 May 2026
placement brief / Uncategorized / placement papers / 15 May 2026

C Programming Placement Questions

C programming remains a foundational language in computer science education and technical placement exams. Despite the emergence of newer languages, C...

Aditya Sharma
Aditya's Edit

PapersAdda 2026 Placement Cycle

By Aditya Sharma·Founder & Editor, PapersAdda

What changed in 2026 drives

Mass-recruiter offer letters are flatter for 2026 batch - the 4-5 LPA ASE band has barely budged in three years while inflation eats real wages. Premium tracks (Digital, Pro, Elite, Specialist) are still where the differential lives, and they are entirely test-driven. If you are aiming higher than the default offer, the coding round is not optional pageantry - it is the entire interview.

What I'd actually study for this

  • 01Two solid coding-round answers (1 medium-hard DSA each, with edge-case discussion) > five half-baked ones
  • 02One real project you can defend end-to-end - file paths, design decisions, and what you would change
  • 03One DBMS schema you actually built (not a textbook ER diagram), with at least 3 join-heavy queries written from memory
  • 04Three behavioural STAR stories: failure recovered, conflict handled, ownership taken

Where most candidates trip up

The single biggest mistake is treating company-specific guides as primary prep and DSA as secondary. It is the opposite. Mass recruiters use the test as a filter, but premium tracks at every IT services company use coding to allocate offer band. Spend 70% of prep time on DSA + system fundamentals, 20% on company-specific patterns, 10% on HR rehearsal. Reverse that ratio and you collect the default offer.

Editorial commentary by Aditya Sharma · written for PapersAdda · not generated, not aggregated.

Last Updated: March 2026


Introduction

C programming remains a foundational language in computer science education and technical placement exams. Despite the emergence of newer languages, C continues to be tested extensively by companies like TCS, Infosys, Wipro, Cognizant, Accenture, Capgemini, and product-based companies. Its emphasis on pointers, memory management, and low-level operations makes it an excellent test of programming fundamentals.

Why C Programming is Important for Placements

  1. Foundation of Programming: C concepts apply to most modern languages
  2. System Programming: Essential for OS, embedded systems, and drivers
  3. Memory Management: Tests understanding of pointers, stack, and heap
  4. Problem-Solving: Develops algorithmic thinking and logical reasoning
  5. Interview Standard: Commonly used in coding interviews and technical tests

Companies Testing C Programming

CompanyDifficultyCommon Topics
TCSEasy-ModerateBasics, arrays, strings, functions
InfosysModeratePointers, structures, file handling
WiproEasy-ModerateControl structures, arrays, recursion
CognizantModeratePointers, memory allocation, strings
AccentureEasyFundamentals, loops, conditionals
CapgeminiModerateData structures in C, pointers
Product CompaniesHardAdvanced pointers, bit manipulation

Frequently Asked Coding Questions with Solutions

Question 1: Factorial Using Recursion

Problem: Write a C program to calculate factorial of a number using recursion.

Solution:

#include <stdio.h>

long long factorial(int n) {
    // Base case
    if (n == 0 || n == 1)
        return 1;
    // Recursive case
    else
        return n * factorial(n - 1);
}

int main() {
    int num;
    printf("Enter a positive integer: ");
    scanf("%d", &num);
    
    if (num < 0) {
        printf("Factorial is not defined for negative numbers.\n");
    } else {
        printf("Factorial of %d = %lld\n", num, factorial(num));
    }
    
    return 0;
}

Output:

Enter a positive integer: 5
Factorial of 5 = 120

Explanation: The function calls itself with decreasing values until reaching the base case (0 or 1), then returns the product of all numbers.


Question 2: Reverse a String

Problem: Write a C program to reverse a string without using library functions.

Solution:

#include <stdio.h>

void reverseString(char str[]) {
    int i, j;
    char temp;
    
    // Find string length
    for (i = 0; str[i] != '\0'; i++);
    
    // Reverse using two-pointer technique
    for (j = 0; j < i / 2; j++) {
        temp = str[j];
        str[j] = str[i - 1 - j];
        str[i - 1 - j] = temp;
    }
}

int main() {
    char str[100];
    
    printf("Enter a string: ");
    gets(str);  // Note: Use fgets in production code
    
    printf("Original string: %s\n", str);
    reverseString(str);
    printf("Reversed string: %s\n", str);
    
    return 0;
}

Output:

Enter a string: Hello World
Original string: Hello World
Reversed string: dlroW olleH

Question 3: Check Prime Number

Problem: Write a C program to check if a number is prime.

Solution:

#include <stdio.h>
#include <stdbool.h>
#include <math.h>

bool isPrime(int n) {
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;
    if (n % 2 == 0 || n % 3 == 0)
        return false;
    
    // Check only up to square root
    for (int i = 5; i * i <= n; i += 6) {
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }
    return true;
}

int main() {
    int num;
    printf("Enter a number: ");
    scanf("%d", &num);
    
    if (isPrime(num))
        printf("%d is a prime number.\n", num);
    else
        printf("%d is not a prime number.\n", num);
    
    return 0;
}

Output:

Enter a number: 17
17 is a prime number.

Question 4: Bubble Sort

Problem: Implement bubble sort to sort an array in ascending order.

Solution:

#include <stdio.h>

void bubbleSort(int arr[], int n) {
    int i, j, temp;
    int swapped;
    
    for (i = 0; i < n - 1; i++) {
        swapped = 0;
        for (j = 0; j < n - i - 1; j++) {
            if (arr[j] > arr[j + 1]) {
                // Swap elements
                temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
                swapped = 1;
            }
        }
        // If no swapping occurred, array is sorted
        if (swapped == 0)
            break;
    }
}

void printArray(int arr[], int size) {
    for (int i = 0; i < size; i++)
        printf("%d ", arr[i]);
    printf("\n");
}

int main() {
    int arr[] = {64, 34, 25, 12, 22, 11, 90};
    int n = sizeof(arr) / sizeof(arr[0]);
    
    printf("Original array: ");
    printArray(arr, n);
    
    bubbleSort(arr, n);
    
    printf("Sorted array: ");
    printArray(arr, n);
    
    return 0;
}

Output:

Original array: 64 34 25 12 22 11 90
Sorted array: 11 12 22 25 34 64 90

Question 5: Linked List Implementation

Problem: Implement a singly linked list with insert, delete, and display operations.

Solution:

#include <stdio.h>
#include <stdlib.h>

struct Node {
    int data;
    struct Node* next;
};

// Insert at beginning
void insertAtBeginning(struct Node** head, int data) {
    struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
    newNode->data = data;
    newNode->next = *head;
    *head = newNode;
}

// Delete a node
void deleteNode(struct Node** head, int key) {
    struct Node *temp = *head, *prev;
    
    if (temp != NULL && temp->data == key) {
        *head = temp->next;
        free(temp);
        return;
    }
    
    while (temp != NULL && temp->data != key) {
        prev = temp;
        temp = temp->next;
    }
    
    if (temp == NULL) return;
    
    prev->next = temp->next;
    free(temp);
}

// Display list
void displayList(struct Node* node) {
    while (node != NULL) {
        printf("%d -> ", node->data);
        node = node->next;
    }
    printf("NULL\n");
}

int main() {
    struct Node* head = NULL;
    
    insertAtBeginning(&head, 3);
    insertAtBeginning(&head, 7);
    insertAtBeginning(&head, 1);
    insertAtBeginning(&head, 9);
    
    printf("Linked List: ");
    displayList(head);
    
    deleteNode(&head, 7);
    printf("After deleting 7: ");
    displayList(head);
    
    return 0;
}

Output:

Linked List: 9 -> 1 -> 7 -> 3 -> NULL
After deleting 7: 9 -> 1 -> 3 -> NULL

Problem: Implement binary search on a sorted array.

Solution:

#include <stdio.h>

int binarySearch(int arr[], int left, int right, int key) {
    while (left <= right) {
        int mid = left + (right - left) / 2;
        
        if (arr[mid] == key)
            return mid;
        
        if (arr[mid] < key)
            left = mid + 1;
        else
            right = mid - 1;
    }
    return -1;  // Element not found
}

int main() {
    int arr[] = {2, 3, 4, 10, 40, 50, 70};
    int n = sizeof(arr) / sizeof(arr[0]);
    int key = 10;
    
    int result = binarySearch(arr, 0, n - 1, key);
    
    if (result == -1)
        printf("Element not found\n");
    else
        printf("Element found at index %d\n", result);
    
    return 0;
}

Output:

Element found at index 3

Question 7: Stack Implementation using Arrays

Problem: Implement a stack using arrays with push, pop, and peek operations.

Solution:

#include <stdio.h>
#include <stdlib.h>

#define MAX 100

struct Stack {
    int arr[MAX];
    int top;
};

void initStack(struct Stack* s) {
    s->top = -1;
}

int isFull(struct Stack* s) {
    return s->top == MAX - 1;
}

int isEmpty(struct Stack* s) {
    return s->top == -1;
}

void push(struct Stack* s, int value) {
    if (isFull(s)) {
        printf("Stack Overflow\n");
        return;
    }
    s->arr[++(s->top)] = value;
    printf("Pushed %d\n", value);
}

int pop(struct Stack* s) {
    if (isEmpty(s)) {
        printf("Stack Underflow\n");
        return -1;
    }
    return s->arr[(s->top)--];
}

int peek(struct Stack* s) {
    if (isEmpty(s)) {
        printf("Stack is empty\n");
        return -1;
    }
    return s->arr[s->top];
}

int main() {
    struct Stack s;
    initStack(&s);
    
    push(&s, 10);
    push(&s, 20);
    push(&s, 30);
    
    printf("Top element: %d\n", peek(&s));
    printf("Popped: %d\n", pop(&s));
    printf("Top element after pop: %d\n", peek(&s));
    
    return 0;
}

Output:

Pushed 10
Pushed 20
Pushed 30
Top element: 30
Popped: 30
Top element after pop: 20

Question 8: Palindrome Check

Problem: Check if a string is palindrome (reads same forwards and backwards).

Solution:

#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <ctype.h>

bool isPalindrome(char str[]) {
    int left = 0;
    int right = strlen(str) - 1;
    
    while (left < right) {
        // Skip non-alphanumeric characters
        while (left < right && !isalnum(str[left]))
            left++;
        while (left < right && !isalnum(str[right]))
            right--;
        
        // Compare characters (case insensitive)
        if (tolower(str[left]) != tolower(str[right]))
            return false;
        
        left++;
        right--;
    }
    return true;
}

int main() {
    char str[] = "A man a plan a canal Panama";
    
    if (isPalindrome(str))
        printf("'%s' is a palindrome\n", str);
    else
        printf("'%s' is not a palindrome\n", str);
    
    return 0;
}

Output:

'A man a plan a canal Panama' is a palindrome

Question 9: File Handling - Read and Write

Problem: Write a program to read from one file and write to another.

Solution:

#include <stdio.h>
#include <stdlib.h>

int main() {
    FILE *source, *target;
    char ch;
    
    // Open source file
    source = fopen("source.txt", "r");
    if (source == NULL) {
        printf("Cannot open source file\n");
        exit(1);
    }
    
    // Open target file
    target = fopen("target.txt", "w");
    if (target == NULL) {
        printf("Cannot open target file\n");
        fclose(source);
        exit(1);
    }
    
    // Copy content
    while ((ch = fgetc(source)) != EOF) {
        fputc(ch, target);
    }
    
    printf("File copied successfully\n");
    
    fclose(source);
    fclose(target);
    
    return 0;
}

Question 10: Matrix Multiplication

Problem: Multiply two matrices and display the result.

Solution:

#include <stdio.h>

#define MAX 10

void multiplyMatrices(int first[MAX][MAX], int second[MAX][MAX], 
                      int result[MAX][MAX], int r1, int c1, int r2, int c2) {
    // Initialize result matrix
    for (int i = 0; i < r1; i++) {
        for (int j = 0; j < c2; j++) {
            result[i][j] = 0;
        }
    }
    
    // Multiply matrices
    for (int i = 0; i < r1; i++) {
        for (int j = 0; j < c2; j++) {
            for (int k = 0; k < c1; k++) {
                result[i][j] += first[i][k] * second[k][j];
            }
        }
    }
}

void displayMatrix(int matrix[MAX][MAX], int row, int col) {
    for (int i = 0; i < row; i++) {
        for (int j = 0; j < col; j++) {
            printf("%d ", matrix[i][j]);
        }
        printf("\n");
    }
}

int main() {
    int first[MAX][MAX] = {{1, 2}, {3, 4}};
    int second[MAX][MAX] = {{5, 6}, {7, 8}};
    int result[MAX][MAX];
    
    printf("First Matrix:\n");
    displayMatrix(first, 2, 2);
    
    printf("\nSecond Matrix:\n");
    displayMatrix(second, 2, 2);
    
    multiplyMatrices(first, second, result, 2, 2, 2, 2);
    
    printf("\nResult Matrix:\n");
    displayMatrix(result, 2, 2);
    
    return 0;
}

Output:

First Matrix:
1 2
3 4

Second Matrix:
5 6
7 8

Result Matrix:
19 22
43 50

Output Prediction Questions (10 Questions)

Question 1: What is the output?

#include <stdio.h>
int main() {
    int a = 5, b = 10;
    printf("%d", a++ + ++b);
    return 0;
}

Question 2: What is the output?

#include <stdio.h>
int main() {
    int x = 10;
    printf("%d %d %d", x, x++, ++x);
    return 0;
}

Question 3: What is the output?

#include <stdio.h>
int main() {
    int arr[] = {1, 2, 3, 4, 5};
    printf("%d", *(arr + 2));
    return 0;
}

Question 4: What is the output?

#include <stdio.h>
void fun(int *p) {
    *p = *p + 10;
}
int main() {
    int x = 5;
    fun(&x);
    printf("%d", x);
    return 0;
}

Question 5: What is the output?

#include <stdio.h>
#define SQUARE(x) x*x
int main() {
    printf("%d", SQUARE(3+2));
    return 0;
}

Question 6: What is the output?

#include <stdio.h>
int main() {
    char str[] = "Hello";
    printf("%lu %lu", sizeof(str), strlen(str));
    return 0;
}

Question 7: What is the output?

#include <stdio.h>
int main() {
    int a = 1, b = 2, c = 3;
    printf("%d", a += b += c);
    return 0;
}

Question 8: What is the output?

#include <stdio.h>
int main() {
    int i = 0;
    for(;;) {
        if(i == 5) break;
        printf("%d ", i++);
    }
    return 0;
}

Question 9: What is the output?

#include <stdio.h>
struct Test {
    int x;
    char y;
};
int main() {
    struct Test t = {10, 'A'};
    printf("%lu", sizeof(t));
    return 0;
}

Question 10: What is the output?

#include <stdio.h>
int main() {
    int a = 5;
    int b = a & 3;
    printf("%d", b);
    return 0;
}

MCQs on C Fundamentals (10 Questions)

Question 1: What is the size of int in C? (Assume 32-bit system)

a) 2 bytes b) 4 bytes c) 8 bytes d) Depends on compiler


Question 2: What does the sizeof operator return?

a) The value of a variable b) The size of a variable in bytes c) The address of a variable d) The type of a variable


Question 3: What is the default return type of a function in C?

a) void b) int c) float d) double


Question 4: Which of the following is not a storage class?

a) auto b) register c) define d) static


Question 5: What is the purpose of extern keyword?

a) To declare a variable defined in another file b) To allocate memory c) To define a constant d) To create a static variable


Question 6: Which operator has the highest precedence?

a) + (addition) b) * (multiplication) c) () (parentheses) d) = (assignment)


Question 7: What is a dangling pointer?

a) A pointer pointing to NULL b) A pointer pointing to a deallocated memory location c) A pointer that is not initialized d) A void pointer


Question 8: What is the output of printf("%d", 8 % 3)?

a) 2 b) 2.66 c) 0 d) 3


Question 9: What does strcat() function do?

a) Compares two strings b) Concatenates two strings c) Copies one string to another d) Calculates string length


Question 10: What is the difference between malloc() and calloc()?

a) No difference b) malloc initializes memory to zero, calloc does not c) calloc initializes memory to zero, malloc does not d) malloc is faster than calloc


Tips for C Programming Coding Rounds

1. Master Pointers

  • Understand pointer arithmetic
  • Practice with arrays and strings using pointers
  • Know the difference between *p, **p, and &p

2. Memory Management

  • Always free dynamically allocated memory
  • Understand stack vs heap allocation
  • Watch for memory leaks and dangling pointers

3. String Handling

  • Remember strings are null-terminated
  • Know standard library functions
  • Practice without using library functions

4. Recursion

  • Always define base case first
  • Understand call stack behavior
  • Practice classic problems (factorial, fibonacci, tower of hanoi)

5. Data Structures

  • Be comfortable with arrays, linked lists, stacks, queues
  • Practice tree traversals
  • Understand hash tables basics

6. Debugging Skills

  • Use print statements effectively
  • Understand common errors (segmentation fault, bus error)
  • Practice tracing code manually

You May Also Like

  • C++ Cheat Sheet 2026
  • C++ Roadmap 2026
  • C++ Interview Questions 2026
  • C++ Crash Course 2026

Frequently Asked Questions (FAQ)

Q1: Is C still relevant for placements in 2026?

Yes, C remains highly relevant. It tests fundamental programming concepts, memory management, and pointer operations that are essential for system-level programming and form the foundation for C++, Java, and other languages.

Q2: What are the most important C topics for placements?

Focus on: Pointers and pointer arithmetic, Arrays and strings, Structures and unions, Dynamic memory allocation (malloc, calloc, free), File handling, Recursion, Linked lists, and Basic sorting/searching algorithms.

Q3: Should I use recursion or iteration?

Use iteration for efficiency (no stack overhead). Use recursion when it significantly simplifies code (tree traversals, divide-and-conquer algorithms). In interviews, know both approaches.

Q4: How do I handle segmentation faults?

Common causes: accessing NULL pointer, array out of bounds, using freed memory, stack overflow. Use debugging tools like GDB or add print statements to trace execution.

Q5: What's the difference between ++i and i++?

++i (pre-increment): increment first, then use the value. i++ (post-increment): use the value first, then increment. In standalone statements, both are equivalent. In expressions, the difference matters.


Master C programming through consistent practice. Focus on understanding memory management, pointers, and data structures. Practice writing clean, efficient code and always trace your programs manually. Good luck with your placement preparation!

Operator's Read (2026-05-16 verification update)

After cross-referencing IndiaBix, PrepInsta, GeeksforGeeks, LeetCode, and 2025-2026 candidate reports on placement tests, here is the operator-level read on C Programming for the 2026 cycle.

Frequency signal. C-programming questions appear in roughly 1 in 3 placement coding rounds across 2025-2026, especially for hardware, embedded, and systems tracks.

Companies testing this topic. Bosch, Intel, AMD, Nvidia, Cisco, Qualcomm, Samsung R-and-D all test C heavily. Service-companies also include 1 to 2 C problems per coding round.

Depth-bar signal. Per LeetCode 2025-2026 and GeeksforGeeks, the bar covers pointers, memory management, structures, file I/O, and one or two DSA problems in C.

My recommended approach. Drill pointer-arithmetic and memory-allocation cold. These two areas separate strong C candidates from weak ones in 2025-2026 reports.

The single most common trap. Dangling-pointer and memory-leak bugs are the dominant deduction. Always pair every malloc with a free in your solutions.

Practice Schedule (7-Day Drill for C Programming)

Run this schedule one week before your placement test. Skipping any day shows up as a measurable weak signal in problem-solving speed.

  1. Day 1. Read the topic theory cold. Note the 4 to 5 core formulas or patterns.
  2. Day 2. Solve 10 easy problems with the textbook approach. Aim for accuracy over speed.
  3. Day 3. Solve 15 medium problems. Track time per problem. Target under 90 seconds per problem.
  4. Day 4. Solve 10 medium and 5 hard problems. Identify your weakest sub-pattern.
  5. Day 5. Drill only the weakest sub-pattern (15 problems). Goal is reflex on that pattern.
  6. Day 6. Take a full mock section with mixed problems. Score yourself against the target.
  7. Day 7. Rest, light revision only. Re-read your formula cheat-sheet once.

Verified Sources (May 2026)

Question patterns and frequency data referenced above are aggregated from these public sources. Cross-check question banks for your specific test format.

  • IndiaBix Coding and DSA question bank, accessed May 2026
  • PrepInsta C Programming question bank, 2025-2026 placement cycle
  • GeeksforGeeks C Programming tutorial and practice section
  • LeetCode discuss interview-experience posts tagged Coding and DSA, 2025 to May 2026
  • AmbitionBox and Glassdoor 2025-2026 candidate interview reports for C Programming
Methodology applied to this articlelast verified 15 May 2026
Sources used
Public exam-pattern documents, official recruiter pages, and verified candidate reports on r/developersIndia and LinkedIn.
Verification window
Page last edited 15 May 2026 by Aditya Sharma. Numbers and patterns sanity-checked against the most recent 2026 cycle drives we tracked.
What we did NOT do
  • No fabricated salary numbers or success rates. If we quote a range, it's sourced.
  • No noun-substituted templates. This article was not generated by swapping company names in a stock prompt.
  • No paid placements, sponsored coaching links, or affiliate-shilled course pushes.
Verification policy: /editorial-standards/. Found something incorrect? Submit a correction - we respond within 48 hours.

topic cluster

More resources in Uncategorized

Use the category hub to browse similar questions, exam patterns, salary guides, and preparation resources related to this topic.

Open Uncategorized hubBrowse all articles

paid contributor programme

Sat this this year? Share your story, earn ₹500.

First-person experience reports help future candidates prep smarter. We pay verified contributors ₹500 via UPI per accepted story with byline.

Submit your story →

ready to practice?

Take a free timed mock test

Put what you learned into practice. Our mock tests match the 2026 pattern with timer, navigator, reveal, and score breakdown. No signup.

Start free mock test →
related guides
more from PapersAdda
Company Placement PapersAccenture Aptitude Questions 2026 (Cognitive and Technical Practice)
10 min read
Company Placement PapersAccenture Gen AI Placement Papers 2026, Full Guide
11 min read
Company Placement PapersAccenture Placement Papers 2026: Cognitive + Coding [Solved]
17 min read
Company Placement PapersAdobe India Placement Papers 2026
6 min read

Share this guide