0% found this document useful (0 votes)
67 views

C Promming

The document contains a list of 15 practical programming assignments for a Computer Science course. The assignments cover topics like arithmetic operations, conditional statements, loops, functions, arrays, structures, pointers, and linked lists. Students are required to write C programs to perform tasks like calculating grades, checking even-odd numbers, reversing digits, generating Fibonacci sequences, checking leap years, building a basic calculator, adding and multiplying matrices, merging sorted arrays, representing time as a structure, creating a cricket player database as a structure array, and performing call by reference for swapping values and creating/traversing a singly linked list.

Uploaded by

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

C Promming

The document contains a list of 15 practical programming assignments for a Computer Science course. The assignments cover topics like arithmetic operations, conditional statements, loops, functions, arrays, structures, pointers, and linked lists. Students are required to write C programs to perform tasks like calculating grades, checking even-odd numbers, reversing digits, generating Fibonacci sequences, checking leap years, building a basic calculator, adding and multiplying matrices, merging sorted arrays, representing time as a structure, creating a cricket player database as a structure array, and performing call by reference for swapping values and creating/traversing a singly linked list.

Uploaded by

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

DOON UNIVERSITY, DEHRADUN

DEPARTMENT OF COMPUTER SCIENCE

LIST OF PRACTICALS

COURSE: B.Sc.(By Research) SEMESTER: I SESSION: 2022-23


SUB.CODE & NAME: CSC101 (C Programming)

Q1. Write the programs to perform addition, subtraction, multiplication, division and modulus
of 2 numbers, when the inputs are
X Y
1 2
2 2.0
3.0 2
4.0 7.0
and output is stored in Z where Z is int, float, etc. show each and every calculation and compare the results
with ordinary calculation.
Q 2. WAP to swapping of 2 numbers using
a) 2 variables
b) 3 variables
Q 3. Print sum of digits of a four digit Number, using a C program.
Q4. Write a program for finding the grade of students, obtained in an examination, where he have three
subjects physics, chemistry and computer with the given conditions
If average of marks is given as follows
Average >= 60 % grade –A
Average >= 50 % and <60 grade –B
Average >= 40 % and <50 grade –C
Average >= 30 % and <40 grade –D
Average < 30 % grade –E
where each and every students can checkup the grade obtained, also compare this result with ordinary
calculation.
Q5. Write a program for checking the given number is even or odd, also discuss the programming complexity
for this program.
Q6. Write a program using while loop to reverse the digits of the given number. For example, the number
12345 should be written as 54321.
Q7. The numbers in the sequence
1 1 2 3 5 8 13 21 ………………………
are called Fibonacci numbers. Write a program using a do……..while loop to calculate and print the first
m Fibonacci numbers.
Q8. In preparing the calendar for a year we need to know whether that particular year is leap or not. Design a
function leap( ) that receives the year as a parameter and returns an appropriate message. What
modifications are required if we want to use the function in preparing the actual calendar?

Faculty Name & Signature

1. Mr. Dheeraj Singh …………. Signature H.O.D ………..


DOON UNIVERSITY, DEHRADUN
DEPARTMENT OF COMPUTER SCIENCE

LIST OF PRACTICALS

COURSE: B.Sc.(By Research) SEMESTER: I SESSION: 2022-23


SUB.CODE & NAME: CSC101 (C Programming)

Q9. Develop a top _ down modular program to implement a calculator. The program should request the user to
input two numbers and display one of the following as per the desire of the user :
a) Sum of the numbers
b) Difference of the numbers
c) Product of the numbers
d) Division of the numbers
Provide separate functions for performing various tasks such as reading, calculating and displaying.
Calculating module should call second level modules to perform the individual mathematical operations.
The main function should have only function calls.
Q10. Write a program for addition and multiplication of two matrix of order 3 x 3, and also find the transpose of
this matrix.
Q11. Given two one dimensional arrays A and B which are sorted in ascending order. Write a program to merge
them into a single sorted array C that contains every item from arrays A and B, in ascending order.
Q12. Define a structure data type called time_struct containing three members integer hour, integer minute and
integer second. Develop a program that would assign values to the individual members and display the
time in the following form : 16 : 40 : 51
Q13. Define a structure called cricket that will describe the following information:
Player name
Team name
Batting average
Using cricket, declare an array player with 50 elements and write a program to read the information about
all the 50 players and print a team wise list containing names of players with their batting average.
Q14. Using call by reference, write a program for swapping of two numbers using
a) two variable
b) three variable.
Q15. Write a program for creation of a one way link list, and traverse it.

Faculty Name & Signature

Ms. Dheeraj Singh …………. Signature H.O.D ………..

You might also like