Every question in the paper gets a full exam-length answer in the app — organised by marks, the way a topper writes it.
5 marks Long answer
Define the structure of a C program and list its major components such as header files, main function, and statements.
Show answer outline
A C program consists of header files, the main function, and statements.
The full exam-length answer is in the app.
5 marks Long answer
List the different data types available in C and describe each with suitable examples.
Show answer outline
C has data types like int, float, char, and double, each serving different purposes.
The full exam-length answer is in the app.
5 marks Long answer
Define formatted input and output statements in C and list commonly used functions like printf() and scanf().
Show answer outline
Formatted I/O in C uses printf() for output and scanf() for input.
The full exam-length answer is in the app.
5 marks Long answer
Explain the concept of arrays in C and describe how single-dimensional arrays are declared, initialized, and accessed.
Show answer outline
Arrays are collections of elements; declared with type and size, initialized using braces.
The full exam-length answer is in the app.
5 marks Long answer
Apply the concepts of function declaration, definition, and function calling in C to develop a program, and demonstrate how data is transferred between functions.
Show answer outline
Functions are declared with prototypes; data is passed via parameters.
The full exam-length answer is in the app.
5 marks Long answer
Define variables and constants in C and list their differences with examples.
Show answer outline
Variables can change values; constants remain fixed, e.g., 'const int x = 10;'.
The full exam-length answer is in the app.
5 marks Long answer
Apply the concept of two-dimensional arrays to develop a C program that performs matrix addition and displays the resulting matrix.
Show answer outline
Use nested loops to iterate through rows and columns for matrix addition.
The full exam-length answer is in the app.
5 marks Long answer
With an example, illustrate the concept of strings in C and describe how they differ from character arrays.
Show answer outline
Strings are null-terminated arrays of characters, differing from char arrays in handling.
The full exam-length answer is in the app.
5 marks Long answer
Apply string handling functions to compare two strings and display whether they are equal or not. (Don't use Built-in Function)
Show answer outline
Implement a loop to compare characters of two strings for equality.
The full exam-length answer is in the app.
5 marks Long answer
Implement a C program using recursion and illustrate the differences between recursive and iterative approaches.
Show answer outline
Recursion calls itself; iteration uses loops for repetition.
The full exam-length answer is in the app.
5 marks Long answer
Discuss the concept of functions and write a program to perform basic calculator operations (+, -, ×, ÷) for given inputs and display the results.
Show answer outline
Define functions for each operation and call them based on user input.
The full exam-length answer is in the app.
5 marks Long answer
Use pointers in a C program to show how arguments are passed to functions and compare call by value with call by reference.
Show answer outline
Pointers allow direct memory access, enabling call by reference.
The full exam-length answer is in the app.
5 marks Long answer
Apply recursion to compute the factorial of a number and explain the flow of execution step by step.
Show answer outline
Factorial is computed by multiplying n by factorial(n-1) until n=1.
The full exam-length answer is in the app.
5 marks Long answer
Analyze how to create and declare a structure with a suitable example.
Show answer outline
Structures group related variables; declared using 'struct' keyword.
The full exam-length answer is in the app.
5 marks Long answer
Interpret a C program to manage information about books in a library. Each book has attributes such as title, author, ISBN, and year of publication. Storing this data in an array of structures makes the code more organized and scalable.
Show answer outline
Use an array of structures to store and manage multiple book records.
The full exam-length answer is in the app.
5 marks Long answer
Define a union in C and examine the syntax of creation and declaration of unions.
Show answer outline
Unions allow storing different data types in the same memory location.
The full exam-length answer is in the app.
5 marks Long answer
Write a C program using a union inside a structure to store employee details such as: Employee ID, Name, Salary / Hourly wage (use union). Evaluate the usage of union inside a structure in this case.
Show answer outline
Unions save memory by allowing one attribute to be used at a time.
The full exam-length answer is in the app.
5 marks Long answer
Evaluate the functions getc(), putc(), getchar(), and putchar() by explaining their working, comparing their usage, and determining their effectiveness in different input and output scenarios.
Show answer outline
These functions handle character input/output with varying buffering.
The full exam-length answer is in the app.
5 marks Long answer
Evaluate the input and output operations performed on files by illustrating how different file I/O functions are used and assessing their effectiveness in file handling.
Show answer outline
File I/O functions manage data transfer between files and programs.
The full exam-length answer is in the app.
5 marks Long answer
Evaluate the different modes of file access by illustrating their usage, and justify the suitability of each mode for various file handling scenarios.
Show answer outline
File modes like read, write, and append dictate how files are accessed.
The full exam-length answer is in the app.
4 marks Medium answer
List and describe logical operators in C and their importance in conditional statements.
Show answer outline
Logical operators include && (AND), || (OR), and ! (NOT) for condition evaluation.
The full exam-length answer is in the app.
4 marks Medium answer
Identify different types of decision control statements and describe their usage.
Show answer outline
Decision control statements include if, else if, else, switch for flow control.
The full exam-length answer is in the app.
4 marks Medium answer
Explain how memory is allocated for arrays and strings in C programming.
Show answer outline
Memory for arrays and strings is allocated on the stack or heap based on declaration.
The full exam-length answer is in the app.
4 marks Medium answer
Explain how indexing is used in arrays and discuss its importance in accessing and manipulating elements.
Show answer outline
Indexing allows access to array elements using zero-based positions.
The full exam-length answer is in the app.
4 marks Medium answer
Analyze the process of memory allocation in structures in a C program.
Show answer outline
Memory for structures is allocated based on the size of their members.
The full exam-length answer is in the app.
4 marks Medium answer
Identify the role of self-referential structures in linked lists.
Show answer outline
Self-referential structures enable linked list node connections.
The full exam-length answer is in the app.
4 marks Medium answer
Evaluate the applicability of the insertion sort algorithm.
Show answer outline
Insertion sort builds a sorted array one element at a time.
The full exam-length answer is in the app.
4 marks Medium answer
Examine the bubble sort algorithm to sort an array.
Show answer outline
Bubble sort repeatedly swaps adjacent elements if they are in the wrong order.
The full exam-length answer is in the app.
4 marks Medium answer
Examine the insertion sort algorithm to sort an array.
Show answer outline
Insertion sort iterates through the array, placing each element in its correct position.
The full exam-length answer is in the app.