You are on page 1of 7

www.mpgirnari.

in

Computer Programming &


Utilization
(2110003)
Lab-manual

Lab-manual - CPU Faculty name :- M. P. Girnari


www.mpgirnari.in

Certificate

This is to Certify that

Shri _________________________________________________________

Enrolment No. ________________________ has satisfactorily completed


his/her course in ____Computer Programming & Utilization_ (2110003)___
within four walls of ___________________________________________.

Date of Submission : __________________


Staff in-Charge : __M. P. Girnari______
Head of Department : __________________

Lab-manual - CPU Faculty name :- M. P. Girnari


www.mpgirnari.in

Index

No. Program Description Page No.

Basic Programs

1 Write a C program to print HELLO, Welcome To The World of C Programming message on


output screen.
2 Write a C program to display the value provided by user.
3 Write a C program to display the value provided by user in different data-type
4 Write a C program to display your full name.
(full name = first_name + middle_name+ last_name)
5 Write a C program to display ASCII value any character entered by user.

Arithmetic

6 Write a program that reads two nos. from key board and gives their addition, subtraction,
multiplication, division and modulo.
7 Write a C program to find the percentage of five subjects.
8 Write a C program to find simple interest.
9 Write a C program to calculate temperature from Centigrade () to Fahrenheit ().
10 Write a C program to calculate perimeter and area of square.
11 Write a C program to calculate area of triangle.
12 Write a C program to calculate area of circle.
13 Write a C program to calculate the length of diagonal using Pythagoras theorem.
14 Write a C program to convert days into years, months and days.
15 The distance between two cities (In KM) is input through key board. Write a program to
convert and print this distance in meters, feet, inches & centimeters.

Lab-manual - CPU Faculty name :- M. P. Girnari


www.mpgirnari.in

Decision Making

16 Write a program to compare two numbers entered by user through keyboard.


17 Write a program to check whether the student is passed or failed.
18 Write a program to check whether the voter is eligible for voting or not.
19 Write a program to check whether the given number is odd or even.
20 Write a program to find largest number from three numbers (with & without conditional
operator).
21 Write a program to check for leap year (with & without conditional operator).
22 Write a program to perform arithmetic operation such as addition, subtraction, multiplication
and division whichever user want to perform. (with & without SWITCH statement)
23 Write a program to check whether the character entered by user through key-board is
alphabet, number or special character.
24 Write a program to solve quadratic function.
25 Write a program to calculate the salary as per given table.

Looping

26 Write a program to display the numbers from 1 to N.


Ex. 1, 2, 3, 4, .. N.
27 Write a program to display only even numbers from 1 to N.
Ex. 2, 4, 6, .. N.
28 Write a program to display only odd numbers from 1 to N.
Ex. 1, 3, 5, .. N.
29 Write a program to display all integer numbers between two given numbers which are
divisible by 5. Also print sum of them.
30 Write a program to display the series & sum of numbers from 1 to N.
Ex. 1+2+3+4+..+N = Result.
31 Write a program to display the series & sum of only even numbers between 1 to N.
Ex. 2+4+6+8+..+N= Result.
32 Write a program to display the series & sum of only even numbers between 1 to N.
Ex. 1+3+5+7+..+N= Result.

Lab-manual - CPU Faculty name :- M. P. Girnari


www.mpgirnari.in

33 Write a program to print 1+ 1/2 +1/3+1/4++1/N series.


34 Write a program to display the multiplication table of integer number provided by user.
35 Write a program to check whether the given number is prime number or not.
36 Write a program to print Fibonacci series.
Series : 1, 1, 2, 3, 5, 8, N
37 Write a program to print the reverse number of given integer number.
38 Write a program to check whether the given number is palindrome number or not.
39 Write a program to find the sum of digit of given integer number.
40 Write a program to check whether the given number is Armstrong number or not.
41 Write a program to display given pattern.
42 Write a program to display square or rectangle shape of given dimension.

Function

43 Write a calculator program (add, subtract, multiply, divide). Prepare user defined function for
each functionality.
44 Write a function program to add first N numbers.
45 Write a function find out maximum out of three numbers.
46 Write a function power that computes x raised to the power y for integer x and y and returns
double type value.
47 Write a program to find factorial of a number.
48 Write a program to find factorial of a number using recursion.
49 Write a program that used user defined function multiplication ( ) that performs
multiplication of two numbers by recursion.
50 Write a function prime that return 1 if its argument is prime and return 0 otherwise.

Array & String

51 Write a program to initializes an integer array (1-D & 2-D) with values and prints the array in
tabular format.
52 Write a program to read 1-D array and modify its content as per user choice.

Lab-manual - CPU Faculty name :- M. P. Girnari


www.mpgirnari.in

53 Write a program to calculate the sum of all the element of the array.
54 Write a program to find the maximum value from all the element of the array.
55 Write a program to illustrate the use of getchar() and putchar().
56 Write a program to illustrate the use of gets() and puts().
57 Write a program to convert the string from lower case to upper case and vice versa as per
user choic.
58 Write a program to compare two strings.
59 Write a program to join or concatenate two strings.
60 Write a program to copy one string to another string.
61 Write a program to count the frequency of occurrence of any character specified by user.
62 Write a program to count the number of words in given string.
63 Write a program to find the length of string.
64 Write a program to reverse a string.
65 Write a program to check for palindrome string.

Structure

66 Define a structure type, personal, that would contain person name, date of joining and salary.
Using this structure, write a program to read this information for one person from the key
board and print the same on the screen.
67 Define a structure called cricket that will describe the following information:
a. Player name
b. Team name
c. Batting average
68 Write a function to enter rollno, marks of the three subjects for 3 student and find total
obtained by each student.
69 Define a structure type, book that would contain name of book, name of author, name of
publication, date of publication and price. Using this structure, write a program to read this
information from the key board and print the same on the screen.
70 Define a structure type, employee that would contain name of employee, name of
department, position, date of joining and salary. Using this structure, write a program to read
this information from the key board and print the same on the screen.

Lab-manual - CPU Faculty name :- M. P. Girnari


www.mpgirnari.in

Pointer

71 Write a program to display the variable & its memory address.


72 Write a program to perform arithmetic operation for two numbers using pointer.
73 Write a program to swap two numbers using pointer.
74 Write a program to find sum of all elements of array using pointer.
75 Write a program using pointer to compare two strings.
76 Write a program using pointer to concatenate two strings.
77 Write a program using pointer to copy one string to another string.
78 Write a program using pointer and function to determine the length of string.

Dynamic Memory Access & File Management

79 Write a program to illustrate reading files contents.


80 Write a program to illustrate writing files contents.
81 Write a program to illustrate the use fprintf() function.
82 Write a program to illustrate the use fscanf() function.
83 Write a program to illustrate the use of malloc() , calloc() & free() function.

Miscellaneous

84 Write a program to add two NxN matrices.


85 Write a program to perform multiplication of two NxN matrices.
86 Write a C program to display prime number between 1 to 100.
87 Write a program to sort the given numbers in ascending order.
88 Write a program to sort the given numbers in descending order.
89 Write a program to convert given decimal number into binary number.
90 Write a program to find number of 1s and 0s in given binary number.

Lab-manual - CPU Faculty name :- M. P. Girnari

You might also like