Skip to content

// Anna University, Chennai / 2024

Anna University — Programming in C (CS3251), November/December 2024

Programming in C · CS3251 · R2021 · B.E./B.Tech. Engineering (common paper)

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

    Write any two applications of C.

    No verified answer or solution is available for this question.

  2. Question 2

    Part AUnit 1Descriptive2 marks

    Programming in C

    Differentiate while and do-while statements.

    No verified answer or solution is available for this question.

  3. Question 3

    Part AUnit 2Descriptive2 marks

    Programming in C

    If string 1 is "C Programming" and string 2 is "Language", write the built-in functions to: (a) Find the length of string 1. (b) Compare the two strings to check whether they are equal.

    No verified answer or solution is available for this question.

  4. Question 4

    Part AUnit 2Descriptive2 marks

    Programming in C

    What happens if a C program assigns a value to an array element whose subscript exceeds the size of the array?

    No verified answer or solution is available for this question.

  5. Question 5

    Part AUnit 3Descriptive2 marks

    Programming in C

    What is the output of the following program? #include <stdio.h> void fun(int *ptr) { *ptr = 30; } int main() { int y = 20; fun(&y); printf("%d", y); return 0; }

    No verified answer or solution is available for this question.

  6. Question 6

    Part AUnit 3Descriptive2 marks

    Programming in C

    List any two built-in math functions.

    No verified answer or solution is available for this question.

  7. Question 7

    Part AUnit 4Descriptive2 marks

    Programming in C

    What are self-referential structures?

    No verified answer or solution is available for this question.

  8. Question 8

    Part AUnit 4Descriptive2 marks

    Programming in C

    Write the syntax for dynamic memory allocation.

    No verified answer or solution is available for this question.

  9. Question 9

    Part AUnit 5Descriptive2 marks

    Programming in C

    Differentiate between sequential and random access.

    No verified answer or solution is available for this question.

  10. Question 10

    Part AUnit 5Descriptive2 marks

    Programming in C

    What do fscanf() and fprintf() do?

    No verified answer or solution is available for this question.

  11. Question 11

    Part BUnit 1Descriptive16 marks

    Programming in C

    (a) (i) Write a C program to check whether a person is eligible to vote using if/else. (8 marks) (ii) Write a C program to print a student's grade using a switch statement. (8 marks) (OR) (b) (i) Write the structure of a C program. (8 marks) (ii) Explain preprocessor directives in C. (8 marks)

    No verified answer or solution is available for this question.

  12. Question 12

    Part BUnit 2Descriptive16 marks

    Programming in C

    (a) Write a program using an array to read and display information about an employee and calculate the employee's payroll. (OR) (b) (i) Write a C program to perform matrix multiplication. (8 marks) (ii) Write a C program to sort the following numbers using selection sort: 45, 6, 89, 3, 4, 56, 10. (8 marks)

    No verified answer or solution is available for this question.

  13. Question 13

    Part BUnits 2, 3Descriptive16 marks

    Programming in C

    (a) (i) Write a C program to generate the Fibonacci series recursively. (8 marks) (ii) Compare pass by value and pass by reference with an example. (8 marks) (OR) (b) (i) Write a C program to check whether a string is a palindrome. (8 marks) (ii) Write a C program to count vowels and consonants in a string using a pointer. (8 marks)

    No verified answer or solution is available for this question.

  14. Question 14

    Part BUnit 4Descriptive16 marks

    Programming in C

    (a) A record holds inpatient information such as pname, Address, PID and Admission_Date. Create a structure to store inpatient records. Write a C program to: (i) Insert a new patient into the system. (8 marks) (ii) Print all inpatient details according to Admission_Date. (8 marks) (OR) (b) (i) Explain the various operations on a singly linked list. (8 marks) (ii) Write a short note on structures. (8 marks)

    No verified answer or solution is available for this question.

  15. Question 15

    Part BUnit 5Descriptive16 marks

    Programming in C

    (a) Write a C program to copy the contents of one file to another. (16 marks) (OR) (b) List the various types of file processing and explain any two. (16 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