Beruflich Dokumente
Kultur Dokumente
C++ Programs
1. Write a menu driven program to do the following:
Input an integer and check for Prime number
Input an integer and check for Armstrong number
Input an integer and check for Palindromic number
Input an integer and check for Fibonacci number
Exit from the menu and quit the program
8. Create a string with 80 characters. Write a menu driven program to do the following without using
any functions from the header files <ctype.h> and string.h>:
Input a string; convert it into lowercase and display the output on the screen
Input a string; convert it into uppercase and display the output on the screen
Input a string; toggle the case of the inputted string; display the output on the screen
Input a string; count and display number of uppercase, lowercase and digits in the string
Input a string; check whether the inputted string is a Palindrome or not
Exit from the menu and quit the program
15. STUDENT.TXT is a text file containing First Name (one word), Subject (BIOLOGY,
PSYCHOLOGY, ECONOMICS), Marks out of 100 and Grades (A1, A2, B1, B2, ). Every line is
separated by new line character. Write a menu driven program in C++ to do the following:
Append n (n is a local variable) records in the file
Display the text file on the screen
Calculate and display total number student and number of students in each subject
Calculate and display average marks for every subject
Count and display number students getting grade A1 and A2
Exit from the menu and quit the program
17. STUDENT.TXT is a text file containing Name (one word), Subject (BIOLOGY, PSYCHOLOGY,
ECONOMICS), Marks out of 100 and Grades (A1, A2, B1, B2, ). Every line is separated by new
line character. Write a menu driven program in C++ to do the following:
Append n (n is a local variable) records in the file
Copy details of BIOLOGY student into another text file BIO.TXT, copy details of ECONOMICS
student into another text file ECO.TXT and copy details of PSYCHOLOGY student into another
text file PSYC.TXT; display the text files on the screen
Copy details of students who have obtained 90 and above into another text file MARK90.TXT;
display the text file MARK90.TXT on the screen
Copy details of students who have obtained either A1 or A2 into another text file A1A2.TXT;
display the text file A1A2.TXT on the screen
Exit from the menu and quit the program
18. Write a menu driven program to implement a linked queue. Queue contains:
Roll Number (integer type)
Name (string 20 characters)
Marks (floating point type marks >=0 and <=100)
The menu should contain following options:
Insert add a student information in the queue
Delete a student information from the queue
Display the content of queue
Exit from the menu and quit the program
19. Write a menu driven program to implement a static queue using an array with at least 10 elements.
Queue contains:
Roll Number (integer type)
Name (string 20 characters)
Marks (floating point type marks >=0 and <=100)
The menu should contain following options:
Insert add a student information in the queue
Delete a student information from the queue
Display the content of queue
Exit from the menu and quit the program
20. Write a menu driven program to implement a linked stack. Stack contains:
Name (string 20 characters)
Theory Marks (floating point type marks between 0 and 70, value to be inputted)
Practical Marks (floating point type marks between 0 and 30, value to be inputted)
Total Marks (floating point type sum of Theory Marks and Practical Marks)
The menu should contain following options:
Class XII Page 5 / 7 Subject: Computer Science (083)
Program for Practical Record File
Insert add a student information in the stack
Delete a student information from the stack
Display the content of stack
Exit from the menu and quit the program
21. Write a menu driven program to implement a stack using a dynamic array having at least 10
elements. Stack contains:
Name (string 20 characters)
Theory Marks (floating point type marks between 0 and 70, value to be inputted)
Practical Marks (floating point type marks between 0 and 30, value to be inputted)
Total Marks (floating point type sum of Theory Marks and Practical Marks)
The menu should contain following options:
Insert add a student information in the stack
Delete a student information from the stack
Display the content of stack
Exit from the menu and quit the program
22. Create a square matrix of integers with size MAX (MAX>=5). Write a menu driven program to:
Assign random values to all elements of the array (>=10 and <=99); obtain a new matrix which
the transpose of the existing matrix; display the both the matrices in matrix format on the screen
Assign random values to all elements of the array (>=10 and <=99); display the matrix in matrix
format; find the sum and product of elements of every row; display the results on the screen
Assign random values to all elements of the array (>=10 and <=99); display the matrix in matrix
format; find the sum and product elements of every column; display the results on the screen
Assign random values to all elements of the array (>=10 and <=99); display the matrix in matrix
format, obtain the sum and product of two diagonal elements separately; display the results on
the screen
Exit from the menu and quit the program
SQL Questions
1. Display details of all the girl students
4. Display the details of student who joined the school in 2002 using AND operator
5. Display the details of student who joined the school in 2002 using BETWEEN operator
6. Display Admission Number, Name, Class and Area of student either from MANGAF or
FAHAHEEL or ABU HALIFA using OR operator
7. Display Admission Number, Name, Class and Area of student either from MANGAF or
FAHAHEEL or ABU HALIFA using IN operator
11. Display the details of student sorted on Class and then on Section
16. Display maximum and minimum Bus Fees paid by the student
17. Count and display number of student belonging to each Class then Section wise
18. Count and display number of student belonging to each Class wise then House wise