FY_BCA_C_SLIP_28



/* Slip no : 28_1 write a prog to accept string from user and display alternate charcter in upper case*/

#include
#include
#include

void main()
{
      char str[20];
      int i;
      clrscr();
      printf("\n Enter string : ");
      gets(str);
      for(i=0;str[i]!='\0';i=i+2)
      {
            str[i]=toupper(str[i]) ;
      }

      printf("\n String is %s ",str);
      getch();
}

No comments:

Post a Comment