Sei sulla pagina 1di 11

C++ Programming Practicals for Grade12

1. a.Define a class student with data members : RollNumber , name and


scores of 5 subjects and member functions to (i) To input the values
(ii) Calculate the total scores and (iii) display the information with
total score and percentage. The execution of the program should be
continued as long as the user wants.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe
Shyam

Supervi
sor

P00
1

13-Nov2004

23-Aug1981

20

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01Jan-2005 and 31-Dec-2010;

c. Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)
2. a.Define a class Account with data members : Account number ,
Name and Balance amount and Member functions to (i) input the
data and (ii) to display the details. Create an object and
demonstrate these functions.

b.SQL:
Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)
3. a.Write a program to check whether a string is palindrome or not.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe
Shyam

Supervi
sor

P00
1

13-Nov2004

23-Aug1981

20

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01-Jan2005 and 31-Dec-2010;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)
4. a.Write a menu program to search an element using Linear Search
and Binary Search.

b.SQL:
Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)
5. a.Write a menu driven program to sort a list of numbers using
Bubble ,Insertion and Selection Sorting Techniques.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe
Shyam

Supervi
sor

P00
1

13-Nov2004

23-Aug1981

20

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01Jan-2005 and 31-Dec-2010;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)
6. a.Write a program to Sort n numbers in ascending / descending
order

b.SQL:

Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)

7. a.Define separate functions with name area() for finding the areas of
circle, square, and rectangle. Write a program to show the
polymorphism concept using these functions.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe
Shyam

Supervi
sor

P00
1

13-Nov2004

23-Aug1981

20

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01Jan-2005 and 31-Dec-2010;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)
8. a.Create a text file and read it for counting the number of vowels in
it and display the count.

b.SQL:
Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)
9. a.Define a class temperature with a data member of temperature
value and member functions to (i) input a value (ii)conversion from
celcius to farenheit and (iii)conversion from farenheit to celcius
.Write a menu driven program for these processes.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe
Shyam

Supervi
sor

P00
1

13-Nov2004

23-Aug1981

20

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01Jan-2005 and 31-Dec-2010;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)
10.
a.Write a program to get the details of books like Book
ID,Name of Book,Number of Copies and Unit price. calculate the total

price of a book title(product of number of copies and unit price).Use


Inheritance concept to illustrate this program.

b.SQL:
Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)
11.
a.Write a C++ program to perform the operations of Stack
using Array.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe

Supervi

P00

13-Nov-

23-Aug-

20

Shyam

sor

2004

1981

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01Jan-2005 and 31-Dec-2010;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)

12.
a.Write a C++ program to perform the operations of Stack
using Linked List.

b.SQL:
Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)

13.
a.Write a C++ program to perform the operations of Queue
using Array.

b.SQL:
Table : Worker
Ecod
e

Name

Desig

Plev
el

Doj

Dob

11

Fizza

Operato
r

P00
3

14-Jun2009

14-Oct1983

13

Ameen
Ahmed

Mechani
c

P00
2

21-Aug2006

13-Mar1984

15

Sanya

Clerk

P00
2

19-Dec2005

09-Jun1983

18

Radhe
Shyam

Supervi
sor

P00
1

13-Nov2004

23-Aug1981

20

Chander
Nath

Operato
r

P00
3

22-Feb2010

12-Jul1987

Write the Sql Commands for the following Queries


(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is
either P001 or P003.
(iii)To add a new row with the following:
19, Daya Kishore ,Operator,P003,10-jun-2008,11-Sep1987
(iv) Give the Output
a. Select Max(Dob) ,Min(Doj) from Worker;
b. Select Plevel ,Name from worker where Doj between 01Jan-2005 and 31-Dec-2010;

c.Reduce the following Boolean expression using KMap:


F(P,Q,R,S) = E(0,1,2,4,5,6,8,12)
14.
a.Write a C++ program to perform the operations of Queue
using Linked List

b.SQL:

Table : Student
Reg
no

Student
Name

Class

Percent
age

Stream

11

Ahmed

11

82

Science

12

Abdul

11

64

Commerce

13

Bilal

11

78

Commerce

14

Jasir

11

87

Science

15

Suhail

11

88

Commerce

Write the Sql Commands for the following Queries


(i) To display the details of all students in the order of Percentage.
(ii) To display Regno, Name and Percentage of those Students
whose Stream is Commerce.
(iii)To add a new row with the following:
20, Daya Kishore ,11,95,Science
(iv) Give the Output
a. Select * from student where Regno in(11,15,20);
b. Select count( *) from student group by Stream;
c.Reduce the following Boolean expression using K-

Map:
F(P,Q,R,S) = E(0,1,2,4,5,6,8,10)

Potrebbero piacerti anche