0% found this document useful (0 votes)
53 views2 pages

CS 3251

C Programming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views2 pages

CS 3251

C Programming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

QUESTIONPAPERCODE:

70069
B.E/B.TECH.DEGREE
EXAMINATIONS,APRIL/MAY2024
SECOND SEMESTER
COMPUTER SCIENCE AND ENGINEERING
CS 3251 – PROGRAMMING IN C

(Common to Computer and Communication Engineering/Information


Technology)

(Regulations 2021)

Time: Three hours


Maximum: 100 marks

PART A-(10x2 = 20 marks)

1. What are the various types of operators?

2. What is the use of preprocessor directive?

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

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

5. How is pointer arithmetic done?

6. Which is better to use? Macro or function. Justify your answer.

7. What is meant by structure definition?

8. Define self-referential data structure.

9. Why are files needed?

10. Give an example for fseek().

PART B-(5x16=80 marks)

11. (a) Explain the storage classes in 'C' with suitable examples.

Or

(b) Explain the looping statement in C with suitable examples.


12. (a) (i) Write a C program to multiply two matrices (2D array) by getting
input from the user. (8)

(ii) Write a C program to find scaling of two matrices (2D array) which will
be entered by a user. (8)

Or

(b)(i) Write a C program to find determinant of a matrix (2D array) which


will be entered by a user. (8)

(ii) Write a C program for matrix transpose.

13. (a) (i) Classify the function prototypes with suitable examples. (8)

(ii) Write a C program to design the scientific calculator using built-in


functions. (8)

Or

(b)(i) Explain the concept of pass by value and pass by reference. Write a
C program to swap the content of two variables using pass by reference.
(8)

(ii) Explain about pointers and write the use of pointers in arrays with
suitable example.(8)

14. (a) What is a structure? Create a structure with data members of


various types and declare two structure variables. Write a program to read
data into these and print the same. Justify the need for structured data
type.

Or

(b) Write a C program to create mark sheet for students using self-
referential structure.

15. (a) (i) Write a C program to get name and marks of 'n' number of
students from user and store them in a file. (8)

(ii) Write a C program to read name and marks of 'n' number of students
from user and store them in a file. If the file previously exits then append
the information into the existing file. (8)

Or

(b) (i) Write a C program to write all the members of an array of structures
to a file using fwrite(). Read the array from the file and display on the
screen. (8)

(ii) Describe command line arguments with example C program. (8)

You might also like