![]() |
VOOZH | about |
Here, we will see how to find the initials of a name using a C program. Below are the examples:
Input: Geeks for Geeks
Output: G F G
We take the first letter of all
words and print in capital letter.Input: Jude Law
Output: J L
Approach:
Below is the C program to print the initials of a name:
Your initials are: G F G
Time Complexity: O(n), where n is the length of the string.
Auxiliary Space: O(1), as constant extra space is used.