Computer XII Practicals
Computer XII Practicals
C language Practicals
Practical #01
Object:
Algorithms:
Step#1: Start.
Step#3: Exit.
Flow Chart:
Start
Print a Statement
Stop
Source Code:
Output:
Practical #02
Object:
Algorithms:
Step#1: Start.
Step#4: Exit.
Flow Chart:
Start
Stop
Source Code:
Output:
Practical #03
Object:
Write a program that read and prints the char, int, float & character as a
string values and print them on screen “scanf()” , “printf()” & escape
sequence.
Algorithms:
Step#1: Start.
Step#4: Exit.
Flow Chart:
Start
Stop
Source Code:
Output:
Practical #04
Object:
Write a program that read that read temperature of 6 days and print it
on string.
Algorithms:
Step#1: Start.
Step#4: Exit.
Flow Chart:
Start
Stop
Source Code:
Output:
Practical #05
Object:
Algorithms:
Step#1: Start.
Step#5: Exit.
Flow Chart:
Start
Print Celsius.
Stop
Source Code:
Output:
Practical #06
Object:
Algorithms:
Step#1: Start.
Step#4: areaoftriangle=1/2*base*height.
Step#6: volumeofsphere=4/3*pi*r^3.
Step#8: Exit.
Flow Chart:
Start Stop
areaofcircle= pi*r^2.
Output:
Practical #07
Object:
Write a program that calculates both the positive and negative roots of
the quadratic equation using the above formula.
Algorithms:
Step#1: Start.
Step#6: Exit.
Flow Chart:
Start Stop
Output:
Practical #08
Object:
Write a program that provide number, its square & its cube.
Algorithms:
Step#1: Start.
Step#2: Define a, b, c.
Step#5: Print b, c.
Step#6: Exit.
Flow Chart:
Start Stop
Define a, b, c. Print b, c.
.
Output:
Practical #09
Object:
Algorithms:
Step#1: Start.
Step#2: Define a, b, c, d.
Step#4: d=a+b+c.
Step#5: Print d.
Step#6: Exit.
Flow Chart:
Start Stop
Define a, b, c, d. Print d.
Output:
Practical #10
Object:
Write a program that inputs a character and print its equivalent ASCII
number.
Algorithms:
Step#1: Start.
Step#2: Define c.
Step#3: Read c.
Step#4: Write c.
Step#5: Exit.
Flow Chart:
Start
Define c. Stop
Read c. Write c.
Source Code:
Output:
Practical #11
Object:
Write a program that inputs cost of any item and if cost is greater than
40000, special tax is added.
Algorithms:
Step#1: Start.
Step#4: if(cost>40000).
Step#7: Exit
Flow Chart:
Stop
Start
Write “Special Tax is
not Added”.
Output:
Practical #12
Object:
Algorithms:
Step#1: Start.
Step#7: Exit.
Flow Chart:
Stop
Start
Else, write "Amount is
Not Taxable".
Output:
Practical #13
Object:
Step#1: Start.
Step#9: Exit.
Flow Chart:
Stop
Read income.
Read income.
Start if(no_of_dependent>5).
Read income.
Read income.
Read income.
Read income.
Source Code:
Output:
Practical #14
Object:
Step#1: Start.
Step#4: If (a > 0)
Step#7: Exit.
Flow Chart:
Stop
Start
Else write "The
number is Negative"
Define integer a.
Write "The number is
positive"
Output:
Practical #15
Object:
Write a program that ask the name of student and his percentage than
display as follows;
If (percentage > 80) then “A-1”
If (percentage > 70) then “A”
If (percentage > 60) then “B”
Algorithms:
Step#1: Start.
Step#9: Exit.
Flow Chart:
Stop
Start
Output:
Practical #16
Object:
Write a program that uses if else ladder to add, subtract, multiply &
divide two numbers.
Algorithms:
Step#1: Start.
Step#4: If ch == 1
Read a and b, calculate c = a + b, write "Answer is = c"
Step#5: Else if ch == 2
Read a and b, calculate c = a - b, write "Answer is = c"
Step#6: Else if ch == 3
Read a and b, calculate c = a * b, write "Answer is = c"
Step#7: Else if ch == 4
Read a and b, calculate c = a / b, write "Answer is = c"
Step#9: Exit
Flow Chart:
Stop
If ch == 4
Start
If ch == 3
Output:
Practical #17
Object:
Write a program that uses number 1,2,3,4 and print the name of that
are you enter.
Algorithms:
Step#1: Start.
Step#9: Exit
Flow Chart:
Stop
If a == 4 write "Four"
Start
If a == 3 write "Three"
Define integer a
If a == 2 write "Two"
Output:
Practical #18
Object:
Step#1: Start.
Step#3: Write "Enter Alphabet to check its vowel or consonant" and read
ch
Step#6: Exit
Source Code:
Output:
Practical #19
Object:
Write a program that Add, Subtract, Multiply and Divide two numbers
using switch case statements.
Algorithms:
Step#1: Start.
Step#9: Exit
Source Code:
Output:
Practical #20
Object:
Write a program that convert the month number into month name.
Algorithms:
Step#1: Start
.
Step#2: Define integer ch
Step#17: Exit
Source Code:
Output:
Practical #21
Object:
Write a program that print the large number among three inputted
numbers.
Algorithms:
Step#1: Start.
Step#4: Write "The Largest Number Among x=10, y=4 & z=20 is:"
Step#6: Else if y > x and y > z, write "The largest Number is y = y"
Step#8: Exit
Source Code:
Output:
Practical #22
Object:
Write a program that use for loop to print numbers from 1 to 10.
Algorithms:
Step#1: Start.
Step#2: Initialize i = 1
Step#5: Increment i by 1
Step#6: Exit
Source Code:
Output:
Practical #23
Object:
Write a program that use while loop to print numbers from 1 to 10.
Algorithms:
Step#1: Start.
Step#2: Initialize i = 1
Step#5: Increment i by 1
Step#6: Exit
Source Code:
Output:
Practical #24
Object:
Write a program that use do while loop to print numbers from 1 to 10.
Algorithms:
Step#1: Start.
Step#2: Initialize a = 1
Step#4: Increment a by 1
Step#6: Exit
Source Code:
Output:
Practical #25
Object:
Algorithms:
Step#1: Start.
Step#2: Initialize i = 1
Step#4: Increment i by 1
Step#6: Exit
Source Code:
Output:
Practical #26
Object:
Algorithms:
Step#1: Start.
Step#2: Initialize i = 0
Step#4: increment i by 2
Step#6: Exit
Source Code:
Output:
Practical #27
Object:
Algorithms:
Step#1: Start.
Step#2: Initialize i = 1
Step#4: increment i by 2
Step#6: Exit
Source Code:
Output:
Practical #28
Object:
Write a program that prompt user whether the number is even or odd.
Algorithms:
Step#1: Start.
Step#2: Define i
Step#4: Read i
Step#5: Check if (i % 2) == 0:
Step#8: Exit
Source Code:
Output:
Practical #29
Object:
Algorithms:
Step#1: Start.
Step#7: Exit
Source Code:
Output:
Practical #30
Object:
Step#1: Start.
Step#5: Calculate b = a * i.
Step#7: Exit
Source Code:
Output:
Practical #31
Object:
Write a program that use do loop to print out the table of ASCII code
from 32 to 127.
Algorithms:
Step#1: Start.
Step#5: Increment n by 1.
Step#7: Exit
Source Code:
Output:
Practical #32
Object:
Step#1: Start.
Step#7: Exit
Source Code:
Output:
MS access Practicals
Practical #01
Object:
Instructions:
1. Create the student table
2. Insert 10 records.
3. Set student ID as a primary key.
4. Find the list of females.
5. Find the list of CS students.
6. Find the list of all students.
Procedure:
To Create Microsoft Access Database:
1. Click Start > Programs > Microsoft Access.
To Input Records:
Instructions:
1. Create the suitable primary key.
2. Insert 10 records.
3. Set student ID as a primary key.
4. Find the list of books which are not for lending.
5. Find the list of books issued
Procedure:
To Create Microsoft Access Database:
To Insert 10 Records:
Instructions:
1. Search the desire Account ID
2. Delete the desire Account ID
3. Also update desire Account ID
4. Relationships between 2 tables or between different two tables,
there are following options:
a. One to one relationship.
Procedure:
To Create Microsoft Access Database:
1. Open Microsoft Access.
2. Click "File" > "New" > "Blank Database."
3. Enter a file name and click "Create."
1. Open the table/query and type the Account ID in the search box.
2. Press "Enter" to find the record.
Instructions:
1. Assign primary Key, create relationship between tables & input 5
records.
2. Calculate percentage up to 2 decimals places by wing expression
builder.
3. Search the records of students who have secured the highest
marks in all students.
Procedure:
To Create Microsoft Access Database:
5. Save and run the query to find students with the highest marks.
Instructions:
1. Assign primary Key, create relationship between tables & input 5
records.
2. Calculate Gross pay = Medical Allowance+ Conveyance Allowance+
House Rent+ Basic Pay.
3. Calculate Tax = Gross pay*5/100.
4. Calculate Net Pay = Gross pay -Tax.
5. Search the record where Net Pay is greater than 10,000
Procedure:
To Create Microsoft Access Database:
To Calculate Tax: