Practical List

Practical List Class XI CS 2015

S No Name of Practical
Flow of control   ( If Else ) :
1 To Find the greater number between given two numbers.
2 Find the greatest number between give three numbers.
3 To check if the given number is even or odd.
4 To find the grade of a student from his/her marks using if statements.
5 Temperature converter.
6 To check if the given input is a number, character or a special character.
Flow Of Control ( Switch Case) :
7 Arithmetic Calculator.
8 Day Of the week.
Flow Of Control ( For Loop ) :
9 To print ‘n’ natural numbers.
10 To print ‘n’ Even numbers.
11 To print ‘n’ odd numbers.
12 To find the sum of ‘n’ natural numbers.
13 To find the sum of ‘n’ even numbers.
14 To find the sum of ‘n’ odd numbers.
15 To find the factorial of a number.
Flow Of Control ( While Loop ) :
16 Check for Armstrong Numbers.
17 Reverse of a number.
18 Sum of individual digits of a number.
19 Binary to Decimal
20 Decimal to Binary.
21 Check for Prime number.
22 Print Fibonacci Series.
23 HCF of two numbers.
24 Check for Armstrong Number
Nested Loops :
25 Write a menu based c++ program using functions to do the following:(i)                  Print the pyramid:11 2

1 2 3

1 2 3 4

1 2 3 4 5

(ii)                Print the pyramid:

1 2 3 4 5

1 2 3 4

1 2 3

1 2

1

(iii)               Print the pyramid:5 4 3 2 15 4 3 2

5 4 3

5 4

5

(iv)              Print the pyramid:

5

5 4

5 4 3

5 4 3 2

5 4 3 2 1

26 Write a C ++ program to print the pyramid
Library Functions
27 Write a C++ program to check whether an input character is Alphabet, numeric or special character.
28 Write a C++ program to change the case of a character from lower case to upper case and vice-versa.
User Defined Functions
29 Print the series of factorials of natural numbers up to n.
30 Print the series of Prime numbers up to n.
31 Print the series of Armstrong numbers up to n.
Arrays
32 Maximum and minimum of an integer array.
33 Sum of the elements of an integer array.
34 Reversing the integer array.
Array of Characters (Strings)
35 Reverse of a String.
36 Check for Palindrome.
37 Conversion to sentence case
38 Word Count of a string.
2 D Array of Integers
39 Print the diagonals of a 2D integer array.
40 Print the upper half of a 2D integer array
41 Print the lower half of a 2D integer array
42 Print the row-sum
43 Print the Column Sum
44 Row swap
45 Column Swap
Array of Strings
46 Write a C++ program to find the largest string from an array of stings.
Structures
47 Write a menu base c++ application to do the following:To create a Structure named student with rollno, name, dob(dd-mm-yyyy)  and marks.To Accept the data for array of structures (n elements).To print the data for all the elements in an organized way.

Practical List Class XII CS 2015

Review of class XI

  1. Write a menu based C++ program to do the following (Use user defined functions in each case):
  • Sum of all elements of the 1D Array
  • Reversing the 1 D integer Array
  • Swapping the first half with the second half in an 1D integer array
  1. Write a menu based C++ program to do the following (Use user defined functions in each case):
  • Swapping the top half rows with the bottom half rows in a 2D integer array
  • Swapping the left half columns with the right half columns in a 2D integer array.
  • Transpose of a 2D integer array
  1. Write a menu based C++ program to do the following (Use user defined functions in each case):
  • Reverse of a String
  • Convert to Sentence case
  • Check for Palindrome

4.Write a C++ function to return the largest string from an array of strings and implement in a program.

5.Write a c++ program to implement an array of structures for Student (rollno, name, marks). The program should contain functions to add a student, display the student list and display the student details having highest marks.

Object Oriented Programming:

  1.   Write a class Employee in c++ with following description:

Private members:
empid                           // Data member to store Employee Id
ename                         // Data member to store Employee name
days                         // Data member to store days worked
rate                         //Rate for which the employee is paid
bonus                    //Data member to store bonus
giveBonus()          // A function which gives bonus based on the number of days worked:
10 to 20 days – 500 ,              21 to 30 days – 1000

setSalary()           // A function to count total salary of the employee ie. product of days and rate plus bonus

Public members:
setData()                    // A function to enter the required Data
showData()                    // A function to display all data and the salary()

Instantiate the class and write the main function as needed.

  1. Write a class Hotel in c++ with following description:
    Private members:
    Rno                            // Data member to store Room No
    Name                         // Data member to store customer name
    Tarrif                         // Data member to store per day charges
    Days                         //Number of days of stay
    Calculate()               // A function to calculate and return the amount
    days*tarrif. If the product is greater that 5000
    then return 1.05*days*tarrif
    Public members:
    Checkin()                    // A function to enter Rno, Name, Tarrif and days
    Display()                    // A function to display Rno, Name, Tarrif, days and
    total amount as per the called Calculate() function

Instantiate the class and write the main function as needed.

  1. Write a class Student with the following description:

Private members:
Rollno  Integer
name    String
marks    Integer
getgrade() should return the grade as ‘A’ if marks is greater than 90 or else return ‘B’
Public members:
Setdata() to insert the values to the private members.
Display() to display the details along with grade.
Write the main() function and invoke the object.

  1. Write a menu driven program to do the following in text file handling.

a)Write a C++ function to count the number of occurrence of character passed as the parameter of the function.

Write a C++ Function that counts the number of articles(“A”,”An”and”The”) in a given text files.

Write a C++ function that transfers all the vowels from “source.txt” to “target.txt”.

Write a C++ function to count the number of lines starting with a alphabet passed as parameters.

Write a C++ function that counts the number of lines starting with the word “the”.

  1. Write a menu Based application to do the following on Binary file :-

Insert object of student class into “student.dat” file.

Display objects from student.dat file.

Search a particular student from the binary file.

Modify the marks of particular student.

12.Write a program to perform the following in 1-D array.

Bubble sort.

Selection sort.

Insertion sort.

13.Following Search on 1-D array : –

Linear search.

Binary search.

14.Array implementation of Stack.

15.Array implementation of Queue.

16.Array implementation of Circular Queue.

17.Link implementation of Stack.

18.Link implementation of Queue.

19.Questions on My SQL.

My SQL queries based on student table.(10 Queries)

My SQL queries based on staff table.(10 Queries)

My SQL queries based on Employment(EMP) and Department(DEP) table.(10 Queries)

My SQL queries based on Music store and album table.(10 Queries)

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s