- Input 'ANKIT'
Output:
A
AN
ANK
ANKI
ANKIT
- Input two strings and swap them using strcpy function. C
- Input string and find string is palindrome or not.
void main()
{
char n[50], n2[50];
printf("Enter name");
gets(n);
strcpy(n2,n);
strrev(n2);
if(strcmp(n,n2)==0)
{
printf("String is Palendrome");
}
else
{
printf("String is Not Palendrome");
}
}
- Input string and count number of vowels. C
- Input string and count blank spaces, characters and words.
- Trim all the spaces in between the sentence. C
- Replace 2 or more blank spaces with a single blank space. C
- Input main string and a sub-string, WAP to find a sub-string from a main string. Python
- Input username and password and check it, username is not case-sensitive, but password is case-sensitive.