0% found this document useful (0 votes)
115 views12 pages

Computer Science: Ractical ILE

This document provides instructions for a practical file in computer science. It lists various requirements for programs in the practical file such as using uniform formatting, including a certificate and index page, and using specific pens for code, comments, and output. The document also provides a sample index for C++ programs and lists 30 potential programs to be included in the practical file.

Uploaded by

Bhawna Sangar
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)
115 views12 pages

Computer Science: Ractical ILE

This document provides instructions for a practical file in computer science. It lists various requirements for programs in the practical file such as using uniform formatting, including a certificate and index page, and using specific pens for code, comments, and output. The document also provides a sample index for C++ programs and lists 30 potential programs to be included in the practical file.

Uploaded by

Bhawna Sangar
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/ 12

Computer Science

PRACTICAL FILE (2017-18)

Made by:

Name : ………………………………………………

Class : XIIth Section: …………………

Roll No.: ………………


:: IMPORTANT NOTES ::

i) The programs of practical file should be prepared in uniform pattern

(same margins, font style & font size in all programs) and presented

properly for all practical assignments with output of programs. These

practical programs are to be written in journal also.

ii) There must be a Certificate Page & Index page in the file.

iii) Index to be written neatly in journal also.

iv) Program headings etc are to be written with black pen and code with

blue pen only.

v) Comments (if any) to be maintained in the program, should be written

with black pen only.

vi) Output presentation should be good & neat (output with pencil or

black pen on the left side).

vii) Every new program to be started from a new page.

viii) Draw Network diagrams with Black Pen only.


:: CERTIFICATE ::

This is to certify that this Practical file is the bonafide work

of Master / Miss __________________________________________

of Class 12th Section ________, Roll No. __________________ of

Ahmedabad Public School International, Bhat, Gandhinagar

carried out in the school under my supervision.

___________________ ___________________
Teacher’s Signature Principal’s Signature
INDEX FOR C++

Sr. No. Program Pg. No.


1. Program to read coordinates of two points and calculates the
distance between them as per following formula:
d=sqrt(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)
2. Write a program to input day number of a week and display the
corresponding day name.
3. Program to create the equivalent of a four-function calculator. The
program requires the user to enter two numbers and an operator.
It then carries out the specified arithmetic operation: Addition,
Subtraction, Multiplication or Division of two numbers. Finally, it
displays the result.
4. Write a menu driven program to calculate the TSA and volume of a
cube, cuboid, or cylinder depending upon user’s choice.
5. Program to count number of characters entered by the user.
6. Program to check if a string is palindrome or not.
7. Program to input characters and change their case.
8. Program to print the largest element of an array.
9. Program to illustrate working of call-by-reference method of a
function invoking.
10. Programs to read sales of 5 salesmen in 12 months and to print
total sales made by each salesman.
11. Program to find whether two strings contain equal number of
characters.
12. Program that uses various functions to sum following series:
- (1)+(1+2)+(1+2+3)... upto N terms
- (22) + (22+42) +(22+42+62) +(22+42+62+82) ... up to N terms.
- 1 + 1/3 + 1/5 + 1/7 + 1/9 + ... up to N terms.
- 1 + 1/x1 + 1/x2 + 1/x3 + 1/x4 + ... Up to N terms.
13. Write a program to determine al Pythagorean triplets in the range
10 to 100. (A Pythagorean triplets is a set of three integers i, j, k
such that i2+j2=k2.
14. An array stores details of 25 students (rollno, name, marks in 3
subjects). Write a program to create such an array and print out a
list of students who have failed in more than one subject. Assume
40% as pass marks.
15. Write a function sum() in C++ with two arguments, double x and
int n. The function should return a value of type double and it
should find the sum of the following series:
1 3 5 7 2n-1
1 + x /1! + x /2! + x /3! + x /4! +……..+ x /n!
16. A linear array if size 50 stores following information: name of the
country, country's capital and per capita income of the country.
Write a complete program in C++ to do the following:
(a) To read a country's name and display capital and per-ca pita
income.
(b) To read name of the capital city and displays country's name
and displays country's name and per capital income. Display an
error message in case of an incorrect input.
17. Program to illustrate working of default arguments. Calculate
simple interest amount making use of default arguments.
18. Program to illustrate working of function overloading. Calculate
interest amount using function overloading.
19. Program to illustrate the use of object arrays by storing details of
10 items in an array of objects.
20. Define a class named HOUSING in C++ with the following
description & create its object in main function:
Private Members:
o REG_NO integer (Ranges 10 - 2000)
o NAME Array of characters (String)
o TYPE character
o COST float
Public Members:
o Function Read_Data() to read an object of HOUSING type.
o Function Display() to display the details of an object.
o Function Draw-Nos() to choose and display the details of 2
houses selected randomly from an array of 10 objects of type
HOUSING. Use random function to generate the registration
nos. to match with REG_NO from the array
21. Create a class student with data members name, class, section,
roll No. and function members getdata(), printdata(), and
promote(). From this class derive a class 'Sr_std' with additional
data member stream. Also include another function member
change_stream().
o Use these classes in a program.
22. Write a program to implement multilevel inheritance in C++ using
classes.
PERSON  STUDENT  SCHOLARSHIP
23. Write a C++ program that creates a file “Story.txt”; Count and
Display the words “this” and “these” present in the file.
24. Write a program to input the name of a text file from the user and
display:
a) The number of blanks present in the file.
b) The number of lines present in the file.
c) The number of capital alphabets present in the file.
d) The number of small alphabets present in the file.
e) The number of lines starting with a capital alphabet.
f) The number of words present in the file.
g) The number of digits present in the file.
h) The number of words ending with a vowel
25. Write a menu driven program in C++ to perform the following
functions on a binary file “BOOK.DAT” containing objects of the
following class:
class Book
{ int BookNo;
char Book_name[20];
public:
// function to enter book details
void enterdetails();
//function to display Book details
void showdetails();
//function to return Book_no
int Rbook_no() {return Book_no;}
//function to return Book_name
int Rbook_name() {return Book_name;}
};
1. Add Records
2. Modify a record for a given book no.
3. Delete a record with a given book no.
4. Search for a record with a given Book name
5. Display Records
26. Write a function in C++ which accepts an integer array and its size
as arguments/parameters and assigns the elements into a two-
dimensional array of integers in the following format:
If the array is 1, 2, 3, 4, 5, 6 If the array is 1, 2, 3
The resultant 2-D array is: The resultant 2-D array is:
123456 123
123450 120
123400 100
123000
120000
100000
27. Write a menu driven program which allows the user to perform
the following operations on a one dimensional array:

Insertion, deletion, searching, sorting (bubble, selection,


insertion), display.

The program should automatically perform binary search if the


array is sorted and linear search otherwise.
28. Write a Menu driven program to do the following in a Matrix:
::MENU OF PROGRAMS::
1. SUM OF BOTH DIAGONALS
2. DISPLAY UPPER HALF OF MATRIX
3. DISPLAY LOWER HALF OF MATRIX
4. TRANSPOSE OF MATRIX
5. EXIT
29. Write a menu based program using Linked Implementation to do
Stack operations with the following options on the basis of user’s
choice.
1. PUSH AN ELEMENT
2. POP AN ELEMENT
3. PRINT STACK
4. EXIT
30. Write a program to create a linked list in which each node
contains the roll number and marks for a student of a class.
Then display a list of all those students whose marks are above 50.
INDEX FOR SQL

Consider the tables given below and answer the questions that follow:

Table: Employee

No Name Salary Zone Age Grade Dept

1 Mukul 30000 West 28 A 10


2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 A 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 20
6 Moksh 37000 South 28 B 10
7 Shelly 36000 North 26 A 30

Table: Department

Dept DName MinSal MaxSal HOD

10 Sales 25000 32000 1


20 Finance 30000 50000 5
30 Admin 25000 40000 7

Write SQL commands to:

Create Table
1. Create the table Employee.
2. Create the table Department.
Insert data in a table
3. Insert data in the table Employee
4. Insert data in the table Department.
Simple Select
5. Display the details of all the employees.
6. Display the Salary, Zone, and Grade of all the employees.
7. Display the records of all the employees along with their annual salaries. The
Salary column of the table contains monthly salaries of the employees.
8. Display the records of all the employees along with their annual salaries. The
Salary column of the table contains monthly salaries of the employees. The new
column should be given the name “Annual Salary”.
Conditional Select using Where Clause
9. Display the details of all the employees who are below 30 years of age.
10. Display the names of all the employees working in North zone.
11. Display the salaries of all the employees of department 10.
Using NULL
12. Display the details of all the employees whose Grade is NULL.
13. Display the details of all the employees whose Grade is not NULL.
Using DISTINCT Clause
14. Display the names of various zones from the table Employee. A zone name should
appear only once.
15. Display the various department numbers from the table Employee. A department
number should be displayed only once.
Using Logical Operators (NOT, AND, OR)
16. Display the details of all the employees of department 10 who are above 30 years
of age.
17. Display the details of all the employees who are getting a salary of more than
35000 in the department 30.
18. Display the names and salaries of all the employees who are not working in
department 20.
19. Display the names and salaries of all the employees who are working neither in
West zone nor in Centre zone.
20. Display the names of all the employees who are working in department 20 or 30.
21. Display the details of all the employees whose salary is between 32000 and
38000.
22. Display the details of all the employees whose grade is between ‘A’ and ‘C’.
23. Display the details of all the employees aged above 30 in West zone.
Using IN Operator
24. Display the names of all the employees who are working in department 20 or 30.
(Using IN operator)
25. Display the names and salaries of all the employees who are working neither in
West zone nor in Centre zone. (Using IN operator)
Using BETWEEN Operator
26. Display the details of all the employees whose salary is between 32000 and
38000.
27. Display the details of all the employees whose grade is between ‘A’ and ‘C’.
Using LIKE Operator
28. Display the name, salary, and age of all the employees whose names start with
‘M’.
29. Display the name, salary, and age of all the employees whose names end with ‘a’.
30. Display the name, salary, and age of all the employees whose names contain ‘a’
31. Display the name, salary, and age of all the employees whose names do not
contain ‘a’
32. Display the details of all the employees whose names contain ‘a’ as the second
character.
Using Aggregate functions
33. Display the sum and average of the salaries of all the employees.
34. Display the highest and the lowest salaries being paid in department 10.
35. Display the number of employees working in department 10.
Using ORDER BY clause
36. Display the details of all the employees in the ascending order of their salaries.
37. Display the details of all the employees in the descending order of their names.
38. Display the details of all the employees in the ascending order of their grades
and within grades in the descending order of their salaries.
Using GROUP BY clause
39. Display the total number of employees in each department.
40. Display the highest salary, lowest salary, and average salary of each zone.
41. Display the average age of employees in each department only for those
departments in which average age is more than 30.
Using UPDATE, DELETE, ALTER TABLE
42. Put the grade B for all those whose grade is NULL.
43. Increase the salary of all the employees above 30 years of age by 10%.
44. Delete the records of all the employees whose grade is C and salary is below
30000.
45. Delete the records of all the employees of department 10 who are above 40 years
of age.
46. Add another column HireDate of type Date in the Employee table.
JOIN of two tables
47. Display the details of all the employees who work in Sales department.
48. Display the Name and Department Name of all the employees.
49. Display the names of all the employees whose salary is out of the specified range
for the corresponding department.
50. Display the name of the department and the name of the corresponding HOD for
all the departments.
INDEX FOR BOOLEAN ALGEBRA

1. Write the equivalent Boolean expression for the following logic circuit.
(a)

(b)

2. Write the POS form of a Boolean Function F, Which is presented by the following
truth table.
X Y Z F
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0

3. Give the following truth table, derive a sum of product (SOP) and Product of Sum
(POS). Form of Boolean expression from it.
A B C F(A,B,C)
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

4. Write the equivalent canonical product of sum expression for the following sum of
product expression: F(X, Y, Z) = π(1,3,6,7)
5. Obtain the minimal form for the following Boolean expression using Karnaugh’s
map: F(A,B,C,D) = ∑(1,3,4,5,6,7,12,13)
INDEX FOR COMMUNICATION AND NETWORKING

1. Expand all short terms to full, given in Chapter: Communication and Network
Concepts.
2. Explain Needs of Networking Evolution and Needs of Network
3. Write the types of Networks and draw the comparison table of them.
4. What is topology? Explain all types of topology with diagrams.
5. List out Network devices and write few lines for each device.
6. Knowledge Supplement Organization has set up its new centre at Manglore for its
office and web based activities. It has four buildings as shown in the diagram
below:

i) Suggest a cable layout of connections between the buildings


ii) Suggest the most suitable place(i.e building) to house the server of this
organization with a suitable reason.
iii) Suggest the placement of the following devices with justification:
i. Repeater
ii. Hub/Switch
iv) The organization is planning to link its front office situated in the city in a hilly
region where cable connection is not feasible, suggest an economic way to
connect it with reasonably high speed?

You might also like