// Anna University, Chennai / 2022
Anna University — Programming in C (CS8251), April/May 2022
Programming in C · CS8251 · R2017 · 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.
Show the use of ternary or conditional operator.
No verified answer or solution is available for this question.
Write a code to find maximum of three numbers.
No verified answer or solution is available for this question.
Distinguish between one dimensional and two dimensional arrays.
No verified answer or solution is available for this question.
List out any four functions that are performed on character strings.
No verified answer or solution is available for this question.
What is function prototype?
No verified answer or solution is available for this question.
Mention the advantage of pass by reference.
No verified answer or solution is available for this question.
What is the difference between enum and macro?
No verified answer or solution is available for this question.
Give example for nested structure.
No verified answer or solution is available for this question.
How can a variable be accessed from another file?
No verified answer or solution is available for this question.
Differentiate sequential access and random access.
No verified answer or solution is available for this question.
(a) Develop a C program for the following: (i) To check whether a number is prime or not. (8 marks) (ii) To convert the temperature given in Fahrenheit to Celsius and vice versa. (8 marks) (OR) (b) Explain in detail the operation of various looping statements in C with suitable examples. (16 marks)
No verified answer or solution is available for this question.
(a) (i) What are the different types of string function? Describe with their purpose. (8 marks) (ii) Write the C program to find the number of vowels, constants, digits and white space in a string. (8 marks) (OR) (b) (i) Write a C program to multiply two 3×3 matrices. (8 marks) (ii) Develop a C program to search an element from the array. (8 marks)
No verified answer or solution is available for this question.
(a) Develop a C program for binary search using recursive function. (16 marks) (OR) (b) (i) Illustrate the C coding for swapping of two numbers using pass by reference. (8 marks) (ii) Write a C program to check whether the input string is palindrome or not. (8 marks)
No verified answer or solution is available for this question.
(a) Define a structure called student that would contain name, regno and marks of five subjects and percentage. Write a program to read the details of name, regno and marks of five subjects for 30 students, calculate the percentage and display the name, regno, marks of the subjects and percentage of each student. (16 marks) (OR) (b) (i) Explain about various functions used for dynamic memory allocation. (8 marks) (ii) Create enum of week days. Write a program in C, use this enum and display it. (8 marks)
No verified answer or solution is available for this question.
(a) Explain the concept of sequential file access. Also write a program to find average of numbers sorted in sequential access file. (16 marks) (OR) (b) Explain the concept of random file access. Also write a program on transaction processing system using random access file. (16 marks)
No verified answer or solution is available for this question.