You are on page 1of 2

KENDRIYA VIDYALAYA SEC-2 R K PURAM NEW DELHI

XI B
COMPUTER SCIENCE PRACTICALS C++
S.No. PROGRAMS
1 Write a C++ program that accepts a character between a to j and prints next 4 characters.
2 Program to calculate and print roots of quadratic equation ax
2
+ bx + c=0.
3 Program to calculate arithmetic calculation using switch. This program inputs two operands and an
operator and then displays the calculated result.
4 Program to calculate and print the sums of even and odd integers of the first n natural numbers.
5 Program to display a menu regarding rectangle operator and perform according to users response.
6 Write a C++ program to check whether the given number is palindrome or not.
7 Given three numbers A, B and C, write a program to write their values in descending order.
8 Write a C++ program to print Fibonacci series i.e., 0 1 1 2 3 5 8
9 Write a C++ program using nested loops to produce particular designs.
10 Write a C++ program to check whether the given character is alphanumeric or a digit.
11 Write a C++ program that checks whether a given character is an alphabet or not. If it is an alphabet,
whether it is lowercase character or uppercase character?
12 Write a C++ program that reads a string and convert it into uppercase.
13 Write a C++ program that reads two strings and appends the first string to the second.
14 Write a C++ program that reads a password and prints OK if the correct password is entered
otherwise print SORRY! The user should be given three chances to type the password.
15 Write a C++ program that reads two strings and copies the smaller string into the bigger string.
16 Write a program to swap two values by
1. Call by value.
2. Call by reference.
17 Program to check whether a given character is contained in a string or not and find its position.
18 Write a C++ program that invokes a function calc() which intakes two integers and an arithmetic
operator and prints the corresponding result.
19 Program to read prices of 20 items in an array and then displays sum of all prices, product of all the
prices and average of them.
20 Program to search for a specific element in a 1-D array.
21 Program to check if the string is palindrome or not.
22 Program to replace every space in a string with a hyphen.
23 Program to find a number of vowels in a given line of text.
24 Program to reverse words of a string individually.
25 Program to add two matrices.
26 Program to subtract two matrices.
27 Program to find row sum and column sum of a matrix.
28 Program to sum the elements above and below the main diagonal of a matrix.
29 Program to transpose a matrix.
30 Program to concatenate two strings.
31 Program to calculate length of a string without using a library function.
32 Program to count number of words present in a line.
33 Program to reverse a string.
34 Program to print largest element of an array using a function.
35 Program to calculate the sum of two 2-D arrays.
36 Program to write the diagonal elements of a given array.
37 Program to accept and print a students result using a structure having array inside it.
38 Program to illustrate passing of structures by value.
39 Program to illustrate passing of a structure by reference.
40 Program to display label of information stored in a structure.
41 Program to write a function in C++ using structures.
42 Write a function that intakes two date (day, month, year) structures and returns the structure with
later date.
43 Write a program (Telephone directory simulation) that can store a list of names and telephone number
alphabetically. Name to be treated as a unit. (define them inside a structure).
44 Assuming suitable data types, give necessary declaration for an array of 20 voter records, each record
of which consists of 4 data values viz. id-no, name, address, age. Make use of above declarations to
write a program segment that prints id no, names of those voter whose age exceeds 60.

You might also like