You are on page 1of 8

***************************

NUMBERS **************************

1. Find the factorial of the 'n' number??


2. Find the number by linear search??
3. Prime Or not???
4. n'th Fibonacci number??
5. palindrome or not??
6. Even Or ODD??
8. Sum of no?
9. Sum of squares of the number??
10 .sum of the cubes of the Number??
11. Largest digit in a Number??
13. find the elements b/w range of 2 no's??
14. sum of the natural no's divisible by 3 or 5??
15. calculate diff b/w sum of squares and squares of sum of the numbers??
16. check the no is increasing or not??
17. check if no is the power of 2 or not??
18. create a method that accepts a no and modifies it such that each of the
digit in the newly formed no is equal diff b/w consecutive digits
20. remove the duplication and print the descending order?/
21. find the sum of the n even numbers that are divisible by 3 and 8??
22. find the sum of factorial for the first 'n' nos in fibnocci series??

23. Method to which accepts double and find the sum of digits to lef and right
of the decimal points and seperated by 1(123.234-6/9)??
24. Avg of n natural numbers??
25. method to find the given triangle is perfect or not ??
26. simple interest??
27. compound interest??
28. Amstrong or not??

************************

STRINGS

***************************

1. Reverse of string
2. No. of vowels and Consonants
3. Convert the first letter of each string to capital letters
4. Convert a string to small letter and vice versa
5. First letter of each word in string and convert into caps
6. Alternate characters of string into upper case
7. Replace given character with special character
8. Replace given index of string with special character
9. Count no. of characters in string
10.Max & Min words in a string according to its length
11. Sort given array (Asc & Desc)
12.Create Mirror image of a string. The method should return the 2 string
separated by a symbol
Eg: (Earth | htraE)
13.Create a method which accepts a string and replaces consonants with
next alphabet
Eg: (Java
------ Kawa)
14.Create a character array and count the number of times each character
is present in array
15. Check if both the strings contain same characters in different order.
16.Replace alternate positions with *

17. Remove duplicate characters in array


18.Alternate Upper Case
19.Create a method which accepts a two array list containing characters.
Merge both array list and sort the elements in resultant set 1 and return
the resultant array
20.Reverse the given string
21. Reverse the string by removing the special character
22.Write a method reverse and mingle which can accept two strings and
reverse the 2nd string in middle of first string
23.Find the occurrence of character in string(Case Sensitive)
Eg: i/p- Welcome World web
o/p - 2
24.Roman value X-10,V-5,I 1,L 50,C-100,M-1000
U can enter string if it contains other than this string store -1 and add value
of roman and display
25.Reverse the string into half reverse
Eg. Hello -------- leHlo
26.Circular shift the given string
27.Last and first letter in upper case
28.Replace a letter by removing special character in a string
29.Find the words that contain min of digits in given array
30.In a given string array find the count of integers present
{he12n,to33434y}
o/p-- 2,5
31. How to Remove a Text from a String using C#
32. Print initial name
33.Repeated words in given string
34.Repeated char in given strings
35.Capitalizing vowels alone
36.Count the no. of Vowels in a string
37.Alternate uppercase
38.Sort words in string
39.Increasing char nor not

40.First letter alone in capital


41.Remove duplicate char from string
42. Print duplicate char alone from string
43. Longest word in string
44. Shortest word in string
45. count vowel and constants in string
46. reverse string

***********************

COLLECTIONS

************************

1. Write a C# method to choose all the elements of same type from an array
list have different types of elements.

***************************

LINQ *******************************

1. Write a C# Method to Count Number of odd integer in the array using


2. Write a C# Method uses to add all the numbers in an array using Linq
3. Write a C# Method to get the total number of characters of all words in the
array using Linq
4. Write a C# Method to get the lowest number in an array using Linq
5. Write a C# Method to get the length of the shortest word in an array using
Linq
6. Write a C# Method to get the length of the longest word in an array using
Linq
7. Write a C# Method to get the average length of the words in an array using
Linq
8. Write a C# Method to get the all double element in the array using Linq

9. Write a C# Method to sort an array in descending order using Linq


10. Write a C# Method to sort an array of words by length using Linq
11. Write a C# method which has a generic Dictionary collection with key as
int and value as string. Using Linq group all the key having same values

************************** ARRAYS *****************************

1. Count of odd or even Numbers in an array


2. nth largest number in the integer array??
3. create a method that accepts an integer array reverse he no in an array and
return in an sorted order?
4. Write a C# method which accepts an array of integer elements and return
the second smallest element in the array
5. Write a C# method which accepts an array of integer elements and return
the second largest element in the array
6. Write a C# method which accepts an integer array, reverse the numbers in
the array and returns the resulting array in sorted order
7. Write a C# method which accepts an integer array and removes all the
duplicates in the array. Return the resulting array in descending order
8. Write a C# method that accepts a character array and count the number of
times each character is present in the array.
9. Write a C# method that accepts a string array and count the number of
character is present in each string element and give the length of the largest
string

10. Write a C# method which can find the sum of the first n prime numbers.
11. Write a C# method which can find the factors of a number. Return the
factors as an array
12. C# Method to find the second largest element in an array

QUESTIONS WHICH THEY GOT FOR TODAY'S TEST....

1. Length of shortest word in string array.


2. Length of total caharacters in a string array.
3. Count the vowels in a string.
4. Roman to Decimal.
5. Sum of cube of first n natural numbers.
6. Discount related program.
7. Put the common numbers in the 2 lists into the 3rd list.

1. Two lists are given, Find the common elements in both the List and store it
to the 3rd list
2. Input is a date, Subtract it with the current date and find whether he is
eligible to vote

3. Input1 and Input2 are two integers. input3 wil be an array. find the count of
al integers between the range of
input1 and input2
4. Input wil be a character. If the character is a upper then store output1 =
"THIS IS CAPITAL"
likewise for numbers,symbols etc
5. Parking lot question
IN time of a vehicle and out time wil be given as string
For 1st 3 hrs 2$. after that hrs it wil be 0.5$ etc. With lot of business cases.
6. Add days to date.

count odd integers in integer array


find largest digit in the integer input
find repeated integers in the input array and sort them in ascending order
find the largest length in the string array

find the average of 5 subject marks and produce grade accordingly


above 60,"first class"
between 59 and 69, "second class"

between 40 and 49, "third class"


less than 40, "failed"