- Back to Home »
- STRING PROGRAMS »
- C PROGRAM TO FIND THE THE INITIALS OF A STRING OR PROPER CASE OR ACROMATIC STRING
Posted by : ANIMESH SHAW
Saturday, 17 September 2011
//program to print the initials of the string entered through the string
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
int i=1,j,k=0;
char a[20];
char b;
printf("\n Enter any string: ");
gets(a);
b=a[0];
printf("%c.",b);
j=strlen(a)-1;
while(i<=j)
{
if(a[i]==' ')
{
b=a[i+1];
printf("%c.",b);
}
i++;
}
getch();
}

Post a Comment