Q1. Write a program to check whether 2 strings given by the user are anagram strings or not.
For example:
str1: Are you engineer.
str2: You are engineer.
Output: yes
str1: Am i fine.
str2: I,m fine.
Output: No
str1: Am i fine.
str2: I am fire.
Output: No
--------------------------------------------
Q2. Write a program to find out the combination of an element of each array gives a result 0.
For example:
array 1: {2,1,4,7}
array 1: {3,-3,-8,0}
array 1: {-1,-4,-7,6}
Output:
pairs =
{2,-8,6}
{1,3,-4}
{4,-3,-1}
{7,0,-7}
------------------------------------------
Q3. Write a program to get the subsequence of a bit 1 and 0 given in a array of bits.
For example:
array={1,0,1,1,0,1,1}
Output={1,0,1,0}
array={1,1,0,1,0,0,1,1}
Output={1,1,0,1,0,0}
-----------------------------------------
Q4. Write a program to get the first non repeating alphabet from the given string by the user
For example:
string = abcba
Output : c
string = abcdecbae
Output : d
string =naveen
Output : a
For example:
str1: Are you engineer.
str2: You are engineer.
Output: yes
str1: Am i fine.
str2: I,m fine.
Output: No
str1: Am i fine.
str2: I am fire.
Output: No
--------------------------------------------
Q2. Write a program to find out the combination of an element of each array gives a result 0.
For example:
array 1: {2,1,4,7}
array 1: {3,-3,-8,0}
array 1: {-1,-4,-7,6}
Output:
pairs =
{2,-8,6}
{1,3,-4}
{4,-3,-1}
{7,0,-7}
------------------------------------------
Q3. Write a program to get the subsequence of a bit 1 and 0 given in a array of bits.
For example:
array={1,0,1,1,0,1,1}
Output={1,0,1,0}
array={1,1,0,1,0,0,1,1}
Output={1,1,0,1,0,0}
-----------------------------------------
Q4. Write a program to get the first non repeating alphabet from the given string by the user
For example:
string = abcba
Output : c
string = abcdecbae
Output : d
string =naveen
Output : a
No comments:
Post a Comment