Board Practical Programs1
Board Practical Programs1
Table: Students
101 Alice 12 1
102 Bob 12 1
103 Charlie 11 2
104 David 11 2
Table: Teachers
1
TeacherID Name Subject
i. Write an SQL query to display the student name, class, and the subject taught by their teacher.
ii. Write an SQL query to display the names of students who are taught by "Mr. Smith."
10. Write a program to show all the four digits Tech numbers. A Tech number is a number that has
an even number of digits and if the number is split into two equal halves (From the middle), then
the square of the sum of these halves is equal to the number itself.
Example: N=2025
First half= 20
Second half=25
(20+25)2
452 =2025
11. Write a program to take two strings from user and check these strings are anagram to each other
or not. Ignore case sensitivity. An anagram of a string is another string that contains the same
characters, only the order of characters can be different.
Example:
S1=”flow”
S2=”wolf”
S1 and S2 are anagram to each other.