Practice Set
Practice Set
B. Problems on Numbers
1. Check if a number is palindrome or not
2. Find all Palindrome numbers in a given range
3. Check if a number is prime or not
4. Prime numbers in a given range
5. Check if a number is armstrong number of not
6. Check if a number is perfect number
7. Even or Odd
8. Check weather a given number is positive or negative
9. Sum of first N natural numbers
10.Find Sum of AP Series
11.Program to find sum of GP Series
12.Greatest of two numbers
13.Greatest of three numbers
14.Leap Year or not
15.Reverse digits of a number
16.Maximum and Minimum digit in a number
17.Print Fibonacci upto Nth Term
18.Factorial of a number
19.Power of a number
20.Factors of a given number
21.Print all prime factors of the given number
22.Check if a number is a strong number or not
23.Check if a Number is Automorphic
24.GCD of two numbers
25.LCM of two numbers
26.Check if a number is Harshad number
27.Check if the number is abundant number or not
28.Sum of digits of a number
29.Sum of numbers in the given range
30.Permutations in which N people can occupy R seats in a classroom
31.Program to add two fractions
32.Replace all 0s with 1s in a given integer
33.Can a number be expressed as a sum of two prime numbers
34.Calculate the area of circle
35.Program to find roots of a Quadratic Equation
D. Problems on String
1. Check if a given string is palindrome or not
2. Count number of vowels, consonants, spaces in String
3. Find the ASCII value of a character
4. Remove all vowels from the string
5. Remove spaces from a string
6. Remove characters from a string except alphabets
7. Reverse a String
8. Remove brackets from an algebraic expression
9. Sum of the numbers in a String
10.Capitalize first and last character of each word
11.Calculate frequency of characters in a string
12.Find Non-repeating characters of a String
13.Check if two strings are anagram of each other
14.Count common sub-sequence in two strings
15.Check if two strings match where one string contains wildcard
characters
16.Return maximum occurring character in the input string
17.Remove all duplicates from the input string.
18.Print all the duplicates in the input string.
19.Remove characters from first string present in the second string
20.Change every letter with the next lexicographic alphabet in the given
string
21.Write a program to find the largest word in a given string.
22.Write a program to sort characters in a string
23.Count number of words in a given string
24.Write a program to find a word in a given string which has the
highest number of repeated letters
25.Change case of each character in a string
26.Concatenate one string to another
27.Write a program to find a substring within a string. If found display
its starting position
28.Reverse words in a string