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

Practical_Index_PPS_CSE_(BE01000121)

The document outlines a series of practical programming exercises for a Computer Science & Engineering course, focusing on C programming skills. It includes eight practical sets covering basic arithmetic operations, decision-making statements, looping, user-defined functions, arrays, string operations, and pointers. Each set contains specific tasks designed to enhance problem-solving abilities in programming.

Uploaded by

smitpd21
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)
76 views

Practical_Index_PPS_CSE_(BE01000121)

The document outlines a series of practical programming exercises for a Computer Science & Engineering course, focusing on C programming skills. It includes eight practical sets covering basic arithmetic operations, decision-making statements, looping, user-defined functions, arrays, string operations, and pointers. Each set contains specific tasks designed to enhance problem-solving abilities in programming.

Uploaded by

smitpd21
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/ 4

SITARAMBHAI NARANJI PATEL INSTITUTE OF

TECHNOLOGY AND RESEARCH CENTRE, UMRAKH

BRANCH: Computer Science & Engineering (CSE)


Subject: Programming for Problem Solving (BE01000121) SEM: 2

Sr. Page.
Date Experiment No. Marks Signature
No.

Practical Set-1 (Basic arithmetic operations and


demonstrates the use of different data types)

1) Write a C program to design basic calculator


(addition, multiplication, division, subtraction).
2) Write a C program to find out the area or circle.
(Area = PI*r*r) Area should be in float.
3) Write a C program to find out the square root of
1 the given number.
4) Write a C program which reads the marks of 3
subjects and find out the average of it.
5) Write a C program to interchange (swap) two
numbers.
6) Write a C program which receives number of days
as input and converts them into Year, Months and
Days.

Practical Set-2 (Decision Making Statement (Part-1))

1) Write a C program to find that the accepted


number is Negative, or Positive or Zero.
2) Write a C program to check whether the given
2 number is even or odd.
3) Write a C program whether the given year is leap
year or not.
4) Write a C program to read three numbers from
keyboard and find out maximum out of these
three. (nested if else)

Page 1 of 4
SITARAMBHAI NARANJI PATEL INSTITUTE OF
TECHNOLOGY AND RESEARCH CENTRE, UMRAKH

BRANCH: Computer Science & Engineering (CSE)


Subject: Programming for Problem Solving (BE01000121) SEM: 2

Practical Set-3 (Decision Making Statement (Part-2))

1) Write a C program to check whether the entered


character is capital, small letter, digit or any
special character.
2) Write a C program to read marks from keyboard
and your program should display equivalent
grade according to following table(if else ladder)
Marks Grade
3 100 - 80 Distinction
79 - 60 First Class
59 - 40 Second Class
< 40 Fail
3) Write a C program to read numbers from 1 to 7
and print relatively day Sunday to Saturday using
switch case.
4) Write a C program to perform arithmetic
operations using switch case.

Practical Set-4 (Looping Statement)

1) Write a C program which finds the summation of


all integer numbers between 1 to 10 using while,
do…while and for loop constructs.
2) Write a C program to find factorial of a given
number.
3) Write a C program to generate first n number of
Fibonacci series.
4 4) Write a C program to reverse a number.
5) Write a C program using for loop construct to find
out all Armstrong numbers between 1 to 500.
6) Write a C program using for loop construct which
prints all prime numbers between 1 to 50.
7) Write a C program to print the following patterns:

Page 2 of 4
SITARAMBHAI NARANJI PATEL INSTITUTE OF
TECHNOLOGY AND RESEARCH CENTRE, UMRAKH

BRANCH: Computer Science & Engineering (CSE)


Subject: Programming for Problem Solving (BE01000121) SEM: 2

Practical Set-5 (User Defined Functions)

1) Write a function Exchange to interchange the


values of two variables, say x and y using call by
5 value and call by reference.
2) Write a function in the C program to return 1 if
number is prime otherwise return 0.
3) Write a C program to find factorial of a number
using recursion.

Practical Set-6 (Array)

1) Write a C program to sort given array in


6 ascending order.
2) Write a C program to add two 3x3 matrices.
3) Write a C program to multiply two 3x3 matrices.

Practical Set-7 (String and its Operations)

1) Write a C program to convert string into upper


case and lower case.
2) Write a C program which counts the number of
7 vowels encountered in a string.
3) Write a C program which finds whether a string
is a palindrome or not. Ex: Madam, Anna,
Malayalam…. are palindrome strings (Ignore
capitalization).

Page 3 of 4
SITARAMBHAI NARANJI PATEL INSTITUTE OF
TECHNOLOGY AND RESEARCH CENTRE, UMRAKH

BRANCH: Computer Science & Engineering (CSE)


Subject: Programming for Problem Solving (BE01000121) SEM: 2

Practical Set-8 (Pointers, Structure & Files in C)

1) Write a C program to print address of variable


using pointer.
2) Write a C program to swap the two values using
pointers.
3) Design a structure student_record to contain
name, branch and total marks obtained. Develop
a program to read data for 3 students in a class and
8 print them.
4) Define a structure called cricket that will describe
the following information:
Player name
Team name
Batting average
Using this structure to read this information of 5
players and print the same on screen.
5) Write a C program to copy content of one file to
other with the help of file handling functions.

Page 4 of 4

You might also like