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();
}

Popular Post

Blog Archive

Total Pageviews

Sign In

Follow by Email

Powered by Blogger.

Like Us on Facebook

Search This Blog

Loading...

Indian Coder

- Copyright © Programming Mania -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -