Skip to content

// Anna University, Chennai / 2022

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

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

    What are the various types of operators?

    No verified answer or solution is available for this question.

  2. Question 2

    Part AUnit 1Descriptive2 marks

    Programming in C

    What is the use of a preprocessor directive?

    No verified answer or solution is available for this question.

  3. Question 3

    Part AUnit 2Descriptive2 marks

    Programming in C

    Declare a float array of size 5 and assign 5 values to it.

    No verified answer or solution is available for this question.

  4. Question 4

    Part AUnit 2Descriptive2 marks

    Programming in C

    Sort the following elements using selection sort: 23, 55, 16, 78, 2.

    No verified answer or solution is available for this question.

  5. Question 5

    Part AUnit 3Descriptive2 marks

    Programming in C

    How is pointer arithmetic done?

    No verified answer or solution is available for this question.

  6. Question 6

    Part AUnits 1, 3Descriptive2 marks

    Programming in C

    Which is better to use, a macro or a function? Justify your answer.

    No verified answer or solution is available for this question.

  7. Question 7

    Part AUnit 4Descriptive2 marks

    Programming in C

    What is meant by structure definition?

    No verified answer or solution is available for this question.

  8. Question 8

    Part AUnit 4Descriptive2 marks

    Programming in C

    Define a self-referential data structure.

    No verified answer or solution is available for this question.

  9. Question 9

    Part AUnit 5Descriptive2 marks

    Programming in C

    Why are files needed?

    No verified answer or solution is available for this question.

  10. Question 10

    Part AUnit 5Descriptive2 marks

    Programming in C

    Give an example for fseek().

    No verified answer or solution is available for this question.

  11. Question 11

    Part BUnits 1, 4Descriptive16 marks

    Programming in C

    (a) Explain the storage classes in C with suitable examples. (OR) (b) Explain looping statements in C with suitable examples.

    No verified answer or solution is available for this question.

  12. Question 12

    Part BUnit 2Descriptive16 marks

    Programming in C

    (a) (i) Write a C program to multiply two matrices (2D arrays) from user input. (8 marks) (ii) Write a C program to find the scaling of two matrices (2D arrays) entered by a user. (8 marks) (OR) (b) (i) Write a C program to find the determinant of a matrix (2D array) entered by a user. (8 marks) (ii) Write a C program for matrix transpose. (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) Classify the function prototypes with suitable examples. (8 marks) (ii) Write a C program to design a scientific calculator using built-in functions. (8 marks) (OR) (b) (i) Explain pass by value and pass by reference. Write a C program to swap the contents of two variables using pass by reference. (8 marks) (ii) Explain pointers and their use with arrays, with a suitable example. (8 marks)

    No verified answer or solution is available for this question.

  14. Question 14

    Part BUnit 4Descriptive16 marks

    Programming in C

    (a) What is a structure? Create a structure with members of various types and declare two structure variables. Write a program to read and print their data. Justify the need for a structured data type. (OR) (b) Write a C program to create marksheets for students using a self-referential structure.

    No verified answer or solution is available for this question.

  15. Question 15

    Part BUnits 4, 5Descriptive16 marks

    Programming in C

    (a) (i) Write a C program to get the names and marks of n students from the user and store them in a file. (8 marks) (ii) Write a C program to read names and marks of n students from the user and store them in a file. If the file already exists, append the information. (8 marks) (OR) (b) (i) Write a C program to write all members of an array of structures to a file using fwrite(). Read the array from the file and display it. (8 marks) (ii) Describe command line arguments with an example C program. (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