#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
//Variable declaration
char s1[20],s2[20],i,len,lenl,s[20],j=0;
//Reading string from user
printf("Enter the First string\n");
gets(s1);
printf("Enter the Second string\n");
gets(s2);
//Comparing the string for equality
//IF both the string are equal the whole string will
consider as suffix
if(strcmp(s1,s2)==0){
printf("Suffix is %s \n",s1);
}
//To minimise the iteration finding the smaller string
s1 is smaller then below code
else if(strcmp(s1,s2)<0){
len=strlen(s1);
lenl=strlen(s2);
//loop will executed based on
length of s1
for(i=len-1;i>=0;i--){
//Comparing each
character and it it is same storing into another array
if(s1[i]==s2[lenl-1]){
s[j]=s1[i];
j++;//index of new array
}
else{
break;
}
lenl--;
}
}
else{
//s2 is the smallest string
len=strlen(s2);
lenl=strlen(s1);
//loop will executed based on
length of s1
for(i=len-1;i>=0;i--){
if(s2[i]==s1[lenl-1]){ //Comparing each character and
it it is same storing into another array
s[j]=s2[i];
j++;
}
else{
break;
}
lenl--;
}
}
//Checking whether any match found
if(strlen(s)<0){
printf("No commmon
suffix\n");
}
else{//printing the suffix
for(j=j-1;j>=0;j--){
printf("%c",s[j]);
}
}
getch();
}

In C programming Language 8. Write and test a function that finds and returns through an...
Write in C language
5. [8] Write a function with prototype » void string_copy(const char source[], char destination[], int n); This function copies string source to string destination. Parameter n represents the size of array destination. If the latter array is not sufficiently large to hold the whole source string then only the prefix of the string which has room in the latter array should be copied. Note that after copying, the null character should also be included to mark...
Haskell Functional Programming Language: Write a function nestedParens that takes a string argument and returns true if it is a nesting of zero or more pairs of parentheses, e.g. "((()))" should return True ; "()()" or "(()))" should return False . Use recursion for this problem. nestedParens :: String -> Bool
Using the programming language Java: Write a function to find the longest common prefix string amongst an array of strings.
C++ programming language Write a program that contains following function: A function that receives a string of character, the function returns the number of letter c's or C's in the string the function receives
[C Programming Language] Write a function that accepts a string (a pointer to a character) and deletes all the trailing spaces at the end of the string.
C++ programming language Write a program that contains following function: A function that receives a string of character, the function return true if the string contains letter c or C, otherwise, return false.
Using Python Programming Language:
3. Write a function flatten that takes a 2D list and returns all the items of each list concatenated together into one new 1D list. For example: flatten ([["a", "b"],["c","0"],["e","f"]]) would return ["a", "b","C","d", "e","f"] Save the function in a PyDev library module named functions.py Write a program t03.py that tests flatten function and prints the returned flat list to the screen. Test your program with a different list, hardcoded in t03.py • Copy the results...
write C program that contains a function that gets a string as a parameter and returns an integer value represents the number of uppercase letters in this string example : "AbcDeFgh" output:"3"
Use Java to answer the question (Occurrences of a specified character) Write a method that finds the number of occurrences of a special character in a string using the following header: public static int count (String str, char a) For example, count("Welcome", 'e') returns 2. Write a test program that prompts the user to enter a string followed by a character then displays the number of occurrences of the character in the string. In addition to the requirements described in...
In C++ Programming Write a program in a file named SeedFinder.cpp that finds and displays all the seeds of a integer given by the user. Let’s define a seed of an integer, n, to be a positive value that equals n when multiplied by its individual digits. For example, 23 is a seed of 138 because 23 × 2 × 3 = 138. 111 is an example of a seed of itself because 111 × 1 × 1 × 1...