Overview

This document serves as a comprehensive guide for students preparing for the Introduction to C Programming (ICP) examinations at Amity University, Greater Noida Campus.

📚 Study Time Estimate

Total guide and all resources will take around 3 hours. These 3 hours can guarantee around 45 marks or even more if done correctly.

📞 Contact for Exact Questions

For exact questions, contact:

  • +91 97921 82280
  • +91 96511 20307

Use NotebookLLM / DeepSeek AI (completely free) or any other generative AI model for getting answers.

Study Resources

🎥 C Programming Tutorial (Excluding Recursion)

Title: C Programming Tutorial For Beginners: Learn C In Hindi

Duration: 1 hour 33 minutes

Description: A short guide which covers all topics excluding recursion. This lecture is sufficient for learning about C.

🎥 Recursion Guide

Title: Recursive Functions: Recursion In C: C Tutorial In Hindi #21

Duration: 25 minutes

Description: Complete guide for recursion in C programming.

🎥 Conceptual Understanding of Recursion

Title: This is a Better Way to Understand Recursion

Duration: 4 minutes

Description: Conceptual understanding with practice questions.

🎥 5 Simple Steps for Solving Recursive Problems

Duration: 20 minutes

Description: Step-by-step approach to solving any recursive problem.

SECTION A – Most Likely Questions

Pick 5 out of 6 questions. If completed, these questions can expect around 15 marks from this particular section.

1. Number System Conversions

Perform the following conversions:

  • Binary to Octal
  • Hexadecimal to Decimal
  • Decimal to Binary with fractions

2. Differentiate Between

  • Structure and Union with example
  • break and continue statements
  • while and do-while loops
  • Arguments and Parameters
  • For vs While vs Do-while loop
  • Entry controlled loop and Exit controlled loop

3. Write a C Program

  • Swap two numbers without a third variable
  • Check if a number is Armstrong
  • Reverse a three-digit number
  • Check if a number is prime
  • GCD Programs
  • To print name of month based on the number inputted by the user
  • Calculator Program based on user input

4. Explain with Diagram

  • Von Neumann architecture / Basic computer organization
  • Functions of ALU, memory unit, control unit
  • Explain System Software Application Software and Utility Softwares
  • Explain basic structure of computer
  • Explain types of computer and generation of computer

5. Control Structures

  • Difference between if-else and switch-case
  • Example of nested if or switch with break

6. C Basics (Explain all by giving examples)

  • List basic data types with sizes
  • Difference between = and ==, & and &&
  • Preprocessor directives and macros vs functions
  • What are variables in C
  • What is enumerated datatype in C
  • Explain functions parameters and arguments
  • Explain function call
  • What is pointer
  • Complete History of C
  • Questions based on Macro Definition
  • Explain Linear Search, Binary Search and Tertiary Search
  • Explain bubble sort and insertion sort
  • Explain input and output
  • Explain the basic structure of C program
  • What are header files and preprocessors and macros
  • C program to generate Pascal Triangle

SECTION B – Most Likely Questions

Pick 2 out of 3 questions. Categories also valid for Section C.

Category 1: Recursion (Very High Probability)

  • Write a recursive function to find the factorial of a number
  • Write a recursive function to print Fibonacci series up to n terms
  • Write a recursive function to find GCD of two numbers
  • Write a recursive function to find the sum of digits of a number
  • Write a recursive function to convert decimal to binary

Category 2: Arrays and Matrices (High Probability)

  • Write a program to find the transpose of a 3×3 matrix
  • Write a program to multiply two 3×3 matrices
  • Write a program to perform linear search / binary search in an array
  • Write a program to find the second largest element in an array without sorting
  • Write a program to sort an array using bubble sort / insertion sort

Category 3: Strings (High Probability)

  • Write a program to check if a string is palindrome (without string.h)
  • Write a program to count vowels, consonants, and spaces in a string
  • Write a program to concatenate two strings without using strcat()
  • Write a program to find the length of a string without using strlen()

Category 4: Structures (High Probability)

  • Define a structure for employees with name, id, salary, date of joining. Write a program to read 10 employees and display those with a salary > 50000
  • Define a structure for students with name, roll, marks in 3 subjects. Write a program to find students with the highest percentage
  • Write a program to store and display an array of structures for book details (title, author, price)

Category 5: File Handling (Very High Probability)

  • Write a program to read numbers from a file and write even numbers to EVEN.txt and odd numbers to ODD.txt
  • Write a program to copy contents of one file to another
  • Write a program to read student records from a file and calculate percentage, write to another file

Category 6: Pointers (Moderate Probability)

  • Write a program to swap two numbers using pointers
  • Write a program to access array elements using pointers
  • Write a program to demonstrate an array of pointers

Category 7: Command Line Arguments (Moderate Probability)

  • Write a program to find the sum of integers passed through command line arguments
  • Write a program to read a filename from command line and display its contents

Predicted Section B Questions (Based on Latest Pattern)

Question 1:

(a) Explain storage classes in C with respect to scope, lifetime, and visibility.

(b) Write a recursive function to find the factorial of a number.

Question 2:

(a) Write a program to check if a string is palindrome without using string.h functions.

(b) Differentiate between macro and function with examples.

Question 3:

(a) Write a program to multiply two 3×3 matrices.

(b) What are command line arguments? Write a program to find the sum of numbers passed through the command line.

Question 4:

Questions based on Macro

SECTION C – COMPULSORY QUESTION ANALYSIS

Pattern Observed:

  • Section C is compulsory (must attempt all parts)
  • Usually has 3–4 sub-questions (a, b, c, d)
  • Total marks: 16–20 marks
  • Combines 2–3 major concepts into one practical problem
  • Often file handling + structures + arrays + functions combined

Most Repeated Section C Themes (Last 10 Years):

  • File Handling with Structures: 9/10 papers
  • Array of Structures + Processing: 8/10 papers
  • Real-world Application Program: 7/10 papers
  • Multiple Concept Integration: 10/10 papers

Detailed Breakdown of Section C Question Types:

Type 1: File + Structure + Sorting/Filtering (Most Common)

Example from PYQs:

  • Read employee records from a file (structure: name, id, salary, date)
  • Filter employees with salary > X
  • Sort by date/name/salary
  • Write to another file

Expected Question:

"A company stores employee data in a file with structure: emp_id, name, department, salary, date_of_joining. Write a program to:

(a) Read all records

(b) List employees in 'Sales' department with salary > 50000

(c) Sort them by date_of_joining (ascending)

(d) Write the filtered sorted list to 'Sales_Employees.txt'"

Type 2: Student Marks Processing (Very Common)

Example from PYQs:

  • Multiple subject marks stored in separate files
  • Calculate percentage/grade
  • Write final result to consolidated file

Expected Question:

"Three files 'Physics.txt', 'Chemistry.txt', 'Maths.txt' contain marks of 30 students. Write a program to:

(a) Read marks from all three files

(b) Calculate percentage for each student

(c) Assign grade (A: >=80%, B: 60-79%, C: 40-59%, F: <40%)< /p>

(d) Write roll_no, name, percentage, grade to 'Result.txt'"

Type 3: Complex String/Structure Manipulation with Functions (Common)

Example from PYQs:

  • Pass structures/strings to functions
  • Modify based on conditions
  • Return processed data

Expected Question:

"Define a structure Book with: title, author, price, pages. Write:

(a) Function to read array of n books

(b) Function to find most expensive book

(c) Function to display books with pages > 300

(d) Main function to demonstrate all"

Type 4: Real-world Calculation Problem (Moderately Common)

Example from PYQs:

  • Loan EMI calculation
  • Distance conversion
  • Scientific calculation

Expected Question:

"Write a program for a library management system:

(a) Structure: book_id, title, author, issued_to, issue_date

(b) Function to issue book (check availability)

(c) Function to calculate fine (Rs. 5 per day after 15 days)

(d) Display all overdue books with fine"

Practice Questions with Answers

Click "View Answer" to see detailed explanation in a new tab.

Question 1: Swap two numbers without using a third variable

#include <stdio.h>

int main() {
    int a = 10, b = 20;
    
    printf("Before swap: a = %d, b = %d\n", a, b);
    
    // Swap without third variable
    a = a + b;
    b = a - b;
    a = a - b;
    
    printf("After swap: a = %d, b = %d\n", a, b);
    
    return 0;
}
View Answer ↗

Question 2: Check if a number is an Armstrong number

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

int main() {
    int num, originalNum, remainder, result = 0, n = 0;
    
    printf("Enter an integer: ");
    scanf("%d", &num);
    
    originalNum = num;
    
    // Count number of digits
    while (originalNum != 0) {
        originalNum /= 10;
        ++n;
    }
    
    originalNum = num;
    
    // Calculate sum of nth power of each digit
    while (originalNum != 0) {
        remainder = originalNum % 10;
        result += pow(remainder, n);
        originalNum /= 10;
    }
    
    if (result == num)
        printf("%d is an Armstrong number.\n", num);
    else
        printf("%d is not an Armstrong number.\n", num);
    
    return 0;
}
View Answer ↗

Question 3: Write a recursive function to find factorial

#include <stdio.h>

int factorial(int n) {
    if (n == 0 || n == 1)
        return 1;
    return n * factorial(n - 1);
}

int main() {
    int num = 5;
    printf("Factorial of %d = %d\n", num, factorial(num));
    return 0;
}
View Answer ↗

Question 4: Program for matrix multiplication (3×3)

#include <stdio.h>

int main() {
    int a[3][3], b[3][3], result[3][3];
    // ... (matrix input code omitted for brevity) ...
    
    // Matrix multiplication logic
    for(int i = 0; i < 3; i++) {
        for(int j = 0; j < 3; j++) {
            result[i][j] = 0;
            for(int k = 0; k < 3; k++) {
                result[i][j] += a[i][k] * b[k][j];
            }
        }
    }
    return 0;
}
View Answer ↗

Question 5: Check if a string is palindrome

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

int main() {
    char str[100];
    int i, len, flag = 0;
    
    printf("Enter a string: ");
    scanf("%s", str);
    
    len = strlen(str);
    
    for(i = 0; i < len/2; i++) {
        if(str[i] != str[len-i-1]) {
            flag = 1;
            break;
        }
    }
    
    if(flag) printf("Not a palindrome");
    else printf("Palindrome");
    
    return 0;
}
View Answer ↗

Question 6: File handling - Even/Odd separation

#include <stdio.h>

int main() {
    FILE *f1, *f2, *f3;
    int num;
    
    f1 = fopen("numbers.txt", "r");
    f2 = fopen("even.txt", "w");
    f3 = fopen("odd.txt", "w");
    
    while(fscanf(f1, "%d", &num) != EOF) {
        if(num % 2 == 0) fprintf(f2, "%d\n", num);
        else fprintf(f3, "%d\n", num);
    }
    
    fclose(f1); fclose(f2); fclose(f3);
    return 0;
}
View Answer ↗

Question 7: Structure for Employee Records

struct Employee {
    int id;
    char name[50];
    float salary;
};

// ... (main function with array of structures) ...
View Answer ↗

Question 8: Structure vs Union

Explain the difference between structure and union with example.

View Answer ↗

Course Syllabus

Unit Topic Details Weightage (%)
1 Introduction Introduction to computer, history, von-Neumann architecture, memory system (hierarchy, characteristics and types), H/W concepts (I/O Devices), S/W concepts (System S/W & Application S/W, utilities). Data Representation: Number systems, character representation codes, Binary, octal, hexadecimal and their interconversions. Binary arithmetic, floating point arithmetic, signed and unsigned numbers, Memory storage unit. 15%
2 Programming in C History of C, Introduction of C, Basic structure of C program, Concept of variables, constants and data types in C, Operators and expressions: Introduction, arithmetic, relational, Logical, Assignment, Increment and decrement operator, Conditional, bitwise operators, Expressions, Operator precedence and associativity. Managing Input and output Operation, formatting I/O. 20%
3 Fundamental Features in C C Statements, conditional executing using if, else, nesting of if, switch and break Concepts of loops, example of loops in C using for, while and do-while, continue and break. Storage types (automatic, register etc.), predefined processor, Command Line Argument. 20%
4 Arrays and Functions One dimensional arrays and example of iterative programs using arrays, 2-D arrays Use in matrix computations. Concept of Sub-programming, functions Example of user defined functions. Function prototype, Return values and their types, calling function, function argument, function with variable number of argument, recursion 20%
5 Advanced Features in C Pointers, relationship between arrays and pointers Argument passing using pointers, Array of pointers. Passing arrays as arguments. Strings and C string library. Structure and Union. Defining C structures, Giving values to members, Array of structure, Nested structure, passing strings as arguments. File Handling. 25%