01CE1101CPLabManualv101pdf 2023 09 13 10 28 02
01CE1101CPLabManualv101pdf 2023 09 13 10 28 02
________________________________________________________
studying in semester ____, class ____ of CE / IT / CE-AI having enrollment no. ___________________
has satisfactorily completed his / her term work in the subject 01CE1101 Computer Programming, for
Date:
Faculty In-Charge
Name:
Signature:
Head of Department:
www.marwadiuniversity.ac.in [email protected]
Rajkot-Morbi Road, Rajkot, Gujarat, India 360003
+91-281-7123456 +91-898003009
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Table of Contents
Sr. Experiment Description Page Date Marks Signature
Practical – 1
1. Motivational videos on Programming. 1
2. Introduction to Turbo C++/ code blocks/ visual 3
source code.
3. Develop a program to print “Hello World”. 5
4. Develop a program to print your address i) using 7
single printf ii) using multiple printf.
5. Develop a program to print addition of 2 9
numbers (with scanf).
Practical – 2
6. Develop a program to convert temperature 13
from Fahrenheit to Celsius. Hint: C= ((F-32)*5)/9
7. Develop a program to find percentage of 5 15
subjects.
8. Develop a program to convert seconds into 17
hours, minutes & seconds and print in
HH:MM:SS [e.g. 10000 seconds mean 2:46:40
(2 Hours, 46 Minutes, 40 Seconds)].
Practical - 3
9. Develop a program to check whetherthe given 21
number is positive or negative.
10. Develop a program to find out largest number 23
from given three numbers using Logical
Operator (&&).
11. Develop a program to check whetherthe given 25
number is positive or Negative.
12. Develop a program to find out largest number 27
from given three numbers without using
Logical Operator (&&).
Practical – 4
13. Develop a program to check whether the given 31
year is leap year or not. [If a year can be
divisible by 4 but not divisible by 100 then it is
leap year but if it is divisible by 400 then it is
leap year].
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
1 *
A B * *
2 3 4 * * *
C D E F * * * *
***********
*********
*******
*****
***
*
34. Develop a program to draw Pascal's triangle. 87
Practical – 10
35. Develop a program to count number of 91
positive or negative number from an array of n
numbers.
36. Develop a program to read n numbers in an 93
array and print them in reverse order.
37. Develop a program to find Max, Min, Sum, Avg 95
of given numbers from an array.
38. Develop a program to sort elements of an array 97
in an ascending order.
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 12
47. Develop a program to count simple interest 119
using function.
48. Develop a program to generate Fibonacci 121
series of N given number using function
name fibbo. (e.g. 1 1 2 3 5 8…).
49. Develop a program to find the factorial of 123
a given number using Recursion.
Practical – 13
50. Develop a program to create structure of book 127
with book title, author name, publication, and
price. Read data of n books and display them.
51. Develop a program to access member of a 129
union using union variable.
52. Develop a program to print value and address of 131
a variable.
53. Develop a program to swap value of two 133
numbers using pointer.
Practical – 14
54. Develop a program to display content of a file. 137
55. Develop a program to copy source file to 139
destination file.
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 1
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 1
1) Motivational videos on programming.
-1-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
-2-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
-3-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
-4-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
-5-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
-6-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
4) Develop a program to print your address i) using single printf ii) using multiple
printf.
-7-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
-8-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
-9-
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 10 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 11 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 12 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 2
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 2
6) Develop a program to convert temperature from Fahrenheit to Celsius.
Hint: C= ((F-32)*5)/9
- 13 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 14 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 15 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 16 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
8) Develop a program to convert seconds into hours, minutes & seconds and print in
HH:MM:SS [e.g. 10000 seconds mean 2:46:40 (2 Hours, 46 Minutes, 40 Seconds)].
- 17 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 18 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 19 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 20 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 3
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 3
Using simple if
9) Develop a program to check whether the given number is positive or negative.
- 21 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 22 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
10) Develop a program to find out largest number from given three numbers using
logical operator (&&).
- 23 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 24 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Using if…else…
11) Develop a program to check whether the given number is positive or negative.
- 25 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 26 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Using nested if
12) Develop a program to find out largest number from given three numbers without
using Logical Operator (&&).
- 27 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 28 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 29 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 30 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 4
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 4
Using if…else if… else
13) Develop a program to check whether the given year is leap year or not. [If a
year can be divisible by 4 but not divisible by 100 then it is leap year but if it is
divisible by 400 then it is leap year].
- 31 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 32 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 33 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 34 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
15) Three sides of a triangle are entered through the keyboard, develop a program
to check whether the triangle is isosceles, equilateral, scalene or right-angled
triangle.
- 35 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 36 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 37 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 38 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 5
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 5
Using Conditional operator (expr1?expr2:expr3)
16) Develop a program to find out largest number from given 2 numbers.
- 39 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 40 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
17) Develop a program to read 3 numbers, multiply largest number from first two
numbers to third one.
- 41 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 42 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 43 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 44 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 45 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 46 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 6
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 6
Discuss while loop
19) Develop a program to print 1 to 10.
- 47 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 48 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 49 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 50 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
21) Develop a program to find whether the given number is prime or not using break.
- 51 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 52 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 53 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 54 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
23) Develop a program to check whether the given number is palindrome or not.
- 55 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 56 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
24) Develop a program to check whether the given number is Armstrong or not.
- 57 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 58 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 59 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 60 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 7
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 7
Discuss for loop
25) Develop a program to print numbers from 1 to 10.
- 61 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 62 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 63 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 64 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 65 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 66 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
28) Develop a program to display the n terms of odd natural number and their sum.
- 67 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 68 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 69 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 70 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 71 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 72 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 8
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 8
Discuss nested for loop
30) Develop a program to find the sum of 1 + (1+2) + (1+2+3) + (1+2+3+4) + … +
(1+2+3+..+n).
- 73 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 74 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 75 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 76 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
32) Develop a program to find out prime numbers between given two numbers.
- 77 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 78 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 79 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 80 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 9
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 9
33) Develop a program to display following patterns
1 1 1 * ***********
23 01 AB ** *********
456 101 234 *** *******
7 8 9 10 0101 CDEF **** *****
***
*
- 81 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 82 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 83 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 84 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 85 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 86 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 87 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 88 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 89 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 90 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 10
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 10
35) Develop a program to count number of positive or negative number from an
array of n numbers.
- 91 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 92 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
36) Develop a program to read n numbers in an array and print them in reverse
order.
- 93 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 94 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
37) Develop a program to find Max, Min, Sum, Avg of given numbers from an array.
- 95 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 96 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 97 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 98 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 99 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 100 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 11
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 11
39) Develop a program to read values in two-dimensional array and print them in
matrix form.
- 101 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 102 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
40) Develop a program to count number of positive, negative and zero elements
from 3 x 3 matrix.
- 103 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 104 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 105 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 106 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
42) Develop a program to calculate the length of given string using strlen.
- 107 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 108 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 109 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 110 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 111 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 112 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 113 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 114 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 115 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 116 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 117 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 118 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 12
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 12
47) Develop a program to count simple interest using function.
- 119 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 120 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 121 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 122 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
49) Develop a program to find the factorial of a given number using recursion.
- 123 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 124 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 125 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 126 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 13
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 13
Structure and Union
50) Develop a program to create structure of book with book title, author
name, publication, and price. Read data of n books and display them.
- 127 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 128 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 129 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 130 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Pointers
52) Develop a program to print value and address of a variable.
- 131 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 132 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 133 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 134 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 135 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 136 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 14
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Practical – 14
54) Develop a program to display content of a file.
- 137 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 138 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 139 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
Output:
- 140 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 141 -
FACULTY OF TECHNOLOGY
CE / IT / CE-AI
01CE1101 – Computer Programming Lab Manual
- 142 -