Professional Documents
Culture Documents
LAB PLAN
Session: 20010-11
Subject: Computer Programming Lab
Simple Programmes
1. Write a Program in C language to print Hello World.
2. Write a Program in C language to add simple two nos and find their average.
3. Write a Program in C language to perform arithmetic operations like Addition, Subtraction,
Multiplication, Division on two numbers. *
4. Write a Program in C language to find the no of Months and remaining days from a given input
days.
5. Write a Program in C language to swap (Exchange) two integer values by using third temporary
variable.*
6. Write a Program in C language to find the area and Circumference of a circle of given radius.*
7. Write a Program in C language to calculate the simple interest.
8. Write a Program in C language to convert the forhanite into degree celsius. *
9. Write a Program in C language to use some mathematical and trigonometric in-built functions.*
10. Write a Program in C language to swap (Exchange) two integer values without using third
temporary variable.*
If Else
12.
13.
14.
Loop
21. Write a Program in C language to print first n natural nos?
*
22. Write a Program in C language to print the sum of n natural nos? *
23. Write a Program in C language to generate the table of a given no. *
24. Write a Program in C language to generate fibonacci series? *
25. Write a Program in C language to calculate factorial of a given nonnegative nteger value?*
26. Write a Program in C language to calculate e x for given input x?
27. Write a Program in C language to check a no is prime or not? *
28. Write a Program in C language to print prime numbers between 1 and 100.
29. Write a Program in C language to calculate sin(x) for given input x? *
1
(c)
(e)
*
***
*****
*******
*********
***********
1
212
32123
4321234
543212345
(b)
*
**
***
****
*****
******
(d)
(f)
***********
*********
*******
*****
***
*
1
22
333
4444
55555
Arrays
37. Write a Program in C language to calculate sum and their average of n given numbers.
38. Write a Program in C language to find max. and min. no. in an array.
39. Write a Program in C language to find the transpose of a matrix?
40. Write a Program in C language to generate fibonacci series using array?
41. Write a Program in C language to find Trace and Norm of a matrix trace is defined as the sum
of principal diagonal elements, norm is defined as the square root of the sum of the squares of all
the elements in a matrix?
42. Write a Program in C language to input a matrix, determine if its symmetrical matrix (a matrix is
said to be symmetrical A=A)?
43. Write a Program in C language to add two matrices?
44. Write a Program in C language to multiply two matrices?
45. Write a Program in C language to arrange 10 nos in an array in ascending order?
46. Write a Program in C language to search an element in an array.
Strings
47. Write a Program in C language to find a string is palindrome or not.
2
48. Write a Program in C language to concatenate to strings without using inbuilt functions on
strings?
49. Write a Program in C language to copy two strings without using inbuilt functions on strings?
50. Write a Program in C language to find the length of a given string without using inbuilt functions
on strings?
51. Write a Program in C language to print the string in a reverse order without using inbuilt
functions on strings?
52. Write a Program in C language to calculate no. of vowels, digits and words in a given string.
53. Write a Program in C language to covert a string into reverse case without using inbuilt functions
on strings.
Pointers
54. Write a Program in C language to understand the working of pointers?
55. Write a Program in C language to find max. and min. no. in an array using pointers?
56. Write a Program in C language to find a string is palindrome or not using pointers?
Functions
57. Write a Program in C language to swap two values by using call by value?
58. Write a Program in C language to swap two values by using call by reference?
59. Write a Program in C language to calculate simple interest using function.
60. Write a Program in C language to find max. and min. in an array by passing an array in a
function.
61. Write a Program in C language to reverse a string by passing a string in a function.
Recursion
62. Write a program to calculate the factorial of a given nonnegative integer number using recursion..
63. Write a Program in C language to print fibonacci series using recursion..
64. Write a Program in C language to print the sum of n numbers using recursion..
Structures
65. Write a Program in C language to demo the working of structures?
66. Write a Program in C language to find the topper among 10 students using structures?
67. Write a Program in C language to find the info of an employee in a particular city using
structures?
68. Design a structure student_record to contain name, date_of_birth and total marks obtained.
Develop a program to read data for 10 students in a class and list them rank-wise?
File Handling
69. Write a Program in C language to demo file handling.
70. Write a Program in C language to demo read and write operations on a file in text mode.
71. Write a Program in C language to write 20 numbers in a file called Number, then read this file
and write even numbers in a file called Even and odd numbers in another file called Odd.
72. Write a Program in C language to store name of ten students in a file called Name and store
roll numbers in a file called Roll then read both files and store name of a student and his\her
roll no. in another file called Record.
73. Write a Program in C language to copy a file into another file