Practical Questions
Computer Science
Class XI

1.       WAP to enter a line in an array containing alphabets, digits and special symbols and display them in separate line with proper heading. Example-
Input Line: Every student23 has^$ equal @# right to educa436tion.
Output should be:
Alphabets: Every student has equal right to education
Digits: 23436
Special Symbols: ^$@#

2.       WAP to enter any two string from user and check whether both strings are equal or not? (Don’t use string function)

3.       WAP to generate any 10 random numbers in the range of 100 to 1000 and get the sum of all these numbers. Suppose the sum of all the numbers are X. Now add all the digits of X and obtain Y. Now check whether Y is Prime or not? If it is a prime number than find its cube else find square.

4.       WAP to print the following series-

a.     Look at this series: 7, 10, 8, 11, 9, 12, ... …n
b.    Look at this series: 6, 11, 21, 36, 56….n
c.       Look at this series: 1, 6, 13, 22, 33…n


5.       Write a program to display the ASCII code of a character entered by the user.
6.       Write a program to print Fibonacci Series i.e., 0 1 1 2 3 5 8….till n.
7.       Define a function named Largest(int, int , int) which should take any three integer values from the user and must return the largest integer. If the largest integer is even than display its half or display its square root.
8.       Write a program which should take any string from user and check whether the string is palindrome or not. (A string is palindrome if it has same sequence of characters after reversing as it was earlier.)
9.       Write a program to accept any four digit number from user and check whether the number is Armstrong or not.
10.   Write  a program to accept a line form user of 200 character and reverse the sequence of characters in the line.
11.   WAP to enter any two string of same size and check total number of uppercase and lowercase letter is both line after concatenation.
12.   WAP to enter any 2 number from user and display and any 5 random numbers between them.
13.   WAP to generate any three digit random number and check whether the number is prim or not. If number is prime then reverse it otherwise find the product of the all the digits in the number.
14.   WAP to define an array to store any 20 integer values and display the square root of all the even numbers and half of all the odd numbers.5- Marks
15.   WAP to define an array to store any line of 100 characters and count total number of vowels in the given line.-5 Marks
16.   WAP to define an array to store a line of 100 characters and convert all the spaces into character ‘@’ and digits in ‘#’. 5-Marks
17.   WAP to define an array to store any 10 integers and swap first two values with last two values. 5 Marks
Example-  Array is:
1      2              3              4              5              6              7              8              9              10

Output should be:

10   9              3              4              5              6              7              8              2              1

Comments

Popular posts from this blog

Viva Questions for IP Class XII