هل يمكن لشخص أن يساعدني ويروي ما هو الخطأ في التعليمات البرمجية الخاصة بي. لقد صنعت الحل باستخدام علبة التبديل واستبدلت علامات الترقيم بسلسلة فارغة.
#include<stdio.h>
#include<string.h>
int main()
{
char st[50];
int i;
printf("ENter the string:\n");
gets(st);
for(i=0;i<strlen(st);i++)
{
switch(st[i])
{
case '!':
case '"':
case '#':
case '$':
case '%':
case '&':strcpy(st[i]," ");
break;
}
printf("String is:\n");
puts(st);
}
return 0;
}