// Anna University, Chennai / 2026
Anna University — Programming in C (CS3251), April/May 2026
Programming in C · CS3251 · R2021 · B.E./B.Tech. Engineering (common paper) · Semester 2
Files open in a new tab. Use your browser's download or save option to keep a copy.
Work through the questions
15 questions
No verified answers are available for this paper.
List any four applications of C.
No verified answer or solution is available for this question.
Define a keyword and give two examples.
No verified answer or solution is available for this question.
What is a two-dimensional array? Give its general declaration.
No verified answer or solution is available for this question.
Write the syntax of any two string handling functions in C.
No verified answer or solution is available for this question.
- 2026
- 2019
Also asked in Anna University — Problem Solving and Python Programming (GE8151), December/January 2019 (2019).
Define recursion with an example.
No verified answer or solution is available for this question.
What is a pointer? Mention any two pointer arithmetic operations.
No verified answer or solution is available for this question.
Define a structure with an example declaration.
No verified answer or solution is available for this question.
- 2026
- 2025
- 2023
Also asked in Anna University — Programming in C (CS3251), November/December 2025 (2025), Anna University — Programming in C (CS3251), November/December 2023 (2023).
Differentiate a structure and a union.
No verified answer or solution is available for this question.
What is a file pointer in C?
No verified answer or solution is available for this question.
Differentiate between sequential and random access files.
No verified answer or solution is available for this question.
(a) (i) Explain the structure of a C program in detail with an example. (6 marks) (ii) Write a C program to find the sum and average of N numbers using a loop. Explain its logic with sample input and output. (10 marks) (OR) (b) (i) Explain the different types of operators in C with examples. (6 marks) (ii) Write a C program to display separate sums of even and odd numbers among the first N integers using a for loop. (10 marks)
No verified answer or solution is available for this question.
(a) (i) Explain the declaration, initialization and memory representation of one-dimensional and two-dimensional arrays in C. (8 marks) (ii) Write a C program that concatenates two strings, compares two strings and finds the length of a string without using built-in functions. (8 marks) (OR) (b) (i) Describe how to search an array using binary search. Write its algorithm and explain it with an example array. (8 marks) (ii) Write a C program to sort N student marks in descending order using selection sort and display the top three marks. (8 marks)
No verified answer or solution is available for this question.
(a) (i) Explain the different types of functions in C and illustrate call by value and call by reference. (8 marks) (ii) Write a recursive C program to find the greatest common divisor of two numbers. Trace its calls. (8 marks) (OR) (b) (i) Explain pointers and discuss pointer arithmetic with simple examples. (8 marks) (ii) Write a C program that uses functions and pointers to swap two variables without using a third variable. (8 marks)
No verified answer or solution is available for this question.
(a) (i) Explain nested structures and arrays of structures with a C example. (6 marks) (ii) Create a C structure named Student with fields RollNo, Name and marks in three subjects. Calculate total and average marks for five students and display them in a formatted table. (10 marks) (OR) (b) (i) Discuss self-referential structures and explain how they help implement linked lists. (8 marks) (ii) Write a C program that uses structures to maintain Employee_ID, Name, Department and Salary. Display all employees and find and print the employee with the highest salary. (8 marks)
No verified answer or solution is available for this question.
(a) (i) Explain file opening modes in C with syntax and examples. (6 marks) (ii) Write a C program to read a text file and count the lines, words and characters. (10 marks) (OR) (b) (i) Explain file handling in C, including modes and the functions used for file operations. (8 marks) (ii) Write a C program to copy the contents of one text file into another using file I/O functions. (8 marks)
No verified answer or solution is available for this question.