List of Programs SQL
List of Programs SQL
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
2. Write a menu driven program to do the following:
Input an integer; count number of digits of the inputted integer and display the result on the
screen
Input an integer; find sum and product of digits of the inputted integer and display the sum and
product on the screen
Input an integer; find product of odd digits (digits not divisible by 2) and sum of even digits
(digits divisible by 2) of the inputted integer and display the sum and product on the screen
Input an integer; find sum and product of reciprocal of digits (ignoring zero) of the inputted
integer and display the sum and product on the screen
Input an integer; find the sum of squares and sum of cubes of digits of the inputted integer and
display the output on the screen
Input an integer; obtain a new integer by reversing the digits of the inputted integer and display
the result on the screen
Exit from the menu and quit the program
3. Write a menu driven program to do the following:
Input two integers; calculate their HCF and display HCF
Input two integers; display all the Armstrong Numbers between two inputted integers
Input two integers; display all the Prime Numbers between two inputted integers
Exit from the menu and quit the program
Note: Use setw()/printf() to display Armstrong Numbers and Prime Numbers
4. Write a menu driven program to do the following:
Input two integers; calculate their LCM and display LCM on the screen
Input two integers; display all the Palindromic Numbers between two inputted integers
Input two integers; display all the Fibonacci Numbers between two inputted integers
Exit from the menu and quit the program
Note: Use setw()/printf() to display Palindromic Numbers and Fibonacci Numbers
5. Declare a structure student with following data members:
Roll Number (integer type)
Name (string of 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 Theory Marks + Practical Marks)
Create an array of student with MAX (at least 10) elements. Write a menu driven program to do the
following:
Input values in the array
Display the array display the array in a tabular format using printf()
Sort the array using selection sort on student roll
Search on student roll using binary search
Class XII
Page 1 / 7
Page 2 / 7
Page 3 / 7
Page 4 / 7
Page 5 / 7
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
2. Display details of students belonging to Class 12
3. Display details of students belonging to PEACE house
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
8. Display details of student whose name starts with A
9. Display details of student whose name ends with N
10. Display the details of student sorted on Name
Class XII
Page 6 / 7
Class XII
Page 7 / 7