Skip to content

// 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.

  1. Question 1

    Part AUnit 1Descriptive2 marks

    Programming in C

    List any four applications of C.

    No verified answer or solution is available for this question.

  2. Question 2

    Part AUnit 1Descriptive2 marks

    Programming in C

    Define a keyword and give two examples.

    No verified answer or solution is available for this question.

  3. Question 3

    Part AUnit 2Descriptive2 marks

    Programming in C

    What is a two-dimensional array? Give its general declaration.

    No verified answer or solution is available for this question.

  4. Question 4

    Part AUnit 2Descriptive2 marks

    Programming in C

    Write the syntax of any two string handling functions in C.

    No verified answer or solution is available for this question.

  5. Question 5

    Part AUnit 3Descriptive2 marks

    Programming in C

    Define recursion with an example.

    No verified answer or solution is available for this question.

  6. Question 6

    Part AUnit 3Descriptive2 marks

    Programming in C

    What is a pointer? Mention any two pointer arithmetic operations.

    No verified answer or solution is available for this question.

  7. Question 7

    Part AUnit 4Descriptive2 marks

    Programming in C

    Define a structure with an example declaration.

    No verified answer or solution is available for this question.

  8. Question 8

    Part AUnit 4Descriptive2 marks

    Programming in C

    Differentiate a structure and a union.

    No verified answer or solution is available for this question.

  9. Question 9

    Part AUnit 5Descriptive2 marks

    Programming in C

    What is a file pointer in C?

    No verified answer or solution is available for this question.

  10. Question 10

    Part AUnit 5Descriptive2 marks

    Programming in C

    Differentiate between sequential and random access files.

    No verified answer or solution is available for this question.

  11. Question 11

    Part BUnit 1Descriptive16 marks

    Programming in C

    (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.

  12. Question 12

    Part BUnit 2Descriptive16 marks

    Programming in C

    (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.

  13. Question 13

    Part BUnit 3Descriptive16 marks

    Programming in C

    (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.

  14. Question 14

    Part BUnit 4Descriptive16 marks

    Programming in C

    (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.

  15. Question 15

    Part BUnit 5Descriptive16 marks

    Programming in C

    (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.

Keep preparing

Revisit another year or explore a different paper in the library.

More from this exam