The document provides an index listing 20 programming problems or exercises covering topics like strings, arrays, sorting, searching, classes, file handling, queues, stacks, and SQL commands. Each entry includes a brief description of the programming task and the expected output. The problems involve writing C++ programs to perform various operations on data structures and files.
The document provides an index listing 20 programming problems or exercises covering topics like strings, arrays, sorting, searching, classes, file handling, queues, stacks, and SQL commands. Each entry includes a brief description of the programming task and the expected output. The problems involve writing C++ programs to perform various operations on data structures and files.
The document provides an index listing 20 programming problems or exercises covering topics like strings, arrays, sorting, searching, classes, file handling, queues, stacks, and SQL commands. Each entry includes a brief description of the programming task and the expected output. The problems involve writing C++ programs to perform various operations on data structures and files.
1 Write a menu driven program to perform following 1 operations on strings without using built-in functions. Find the length of the strings. Compare two strings. Concatenate two strings.
2 Create arrays containing country and capital. Now write
a menu driven program to: Display capital of a given country. Print the tabular report of the country and corresponding capital.
3 Write a function in C++ which accepts a 2D array of
integers and its size as arguments and displays elements which are exactly two-digit number 4 Write a program to declare arrays for : name, roll, m1, m2, m3, total for N students and print the tabular report and report card of an individual student according to user’s choice.
5 Write a program to display the report card of any
student and also print the tabular report of the whole class in ascending order of total marks. (Use structure: Roll, Name, Mark1, mark2, Mark3, Total).
6 Write a menu driven program:
To read an integer array To sort it using bubble sort. To search an element using the binary search.
7 A class student has three data members and few
member functions: Name Rollno Marks Input() Display() Write a menu driven program: To create a file. To print the stream according to the total marks of the student: 96 or more Computer Science. 91 – 95 Electronics 86 – 90 Mechanical 81 – 85 Electrical 76 – 80 Chemical 71 – 75 Civil 8 Declare a class containing: Eno , Name, Salary, required functions Write a menu driven program: To create an array of 10 employees To display the record in ascending order of salary 9 Write a menu driven program: To create a text file. To create another file using the first one which will store all the words starting with vowels 10 Write a menu driven program : To create a text file To count number of vowels, digits and words. To create another file using the original which will contain the text after replacing all the blank spaces with #.
11 Write a menu driven program:
To create a text file To read the file and display Uppercase vowels Uppercase consonants Lowercase vowels Lowercase consonants. To create another file using the first file which will take only vowels from the first file 12 Declare a class containing: Name Address Telephone no Write a menu driven program to: Append a record in a file. Display the name and address for a given telephone number.
13 A blood bank maintains the record of donor: name,
address, blood group. Write a menu driven program To create file of donors To print the name of all donors having given blood group To print the tabular list of donors.
14 Declare a class containing:
Bno Bname Price And required functions Write a menu driven program: To add a record in a file To modify the price of the given Bno
15 Define a class clothing in C++ with the following
description: Private members: Code of type string Type of type string Size of type string Material of type string Price of type float A function Calc_Price() which calculates and assigns the value of Price as follows: For the value of material as “COTTON” the above mentioned price gets reduced by 25%. Public members: A constructor to assign initial values of Code, Type and Material with the word “NOT ASSIGNED” and Size and Price with 0. A function Enter() to input the values of the data members code, Type, Size and material and invoke the Calc_Price() function. A function Show() which displays the content of all the data members for a clothing. Write a program to read and write the object of the above class in a file.
16 Declare a class sports having:
Sno Sname Fees Required functions Write a menu driven program: To append record in a file To delete the record of given sno.
17 Each node of QUEUE contains:
Eno , Salary, Pointer Field Front is the first node of Queue and Rear is the last node. Write a menu-driven program: To add element in the queue. To delete element from the queue.
18 Each node of STACK contains:
Rollno Age Pointer field TOP is the first node of STACK. Write a menu driven program: To push To pop
19 Declare a linear stack containing integer. Write a menu
driven program to push and pop elements. 20 15 SQL Commands along with the output based on any table or relation.