Write a program to input a string and create another string object that contains all the characters of the first string in the given order. (capital letters, digits, space characters and other special characters)
Answers
Answered by
2
Answer:
Explanation:
String containing first letter of every word in a given string with spaces
A String str is given which contains lowercase English letters and spaces. It may contain multiple spaces. Get the first letter of every word and return the result as a string. The result should not contain any space.
Examples:
Input : str = "geeks for geeks"
Output : gfg
Input : str = "happy coding"
Output : hc
Similar questions