Write a c program to print the string from given character







#include<string.h>
#include<stdio.h>
int main(){
  char *p;
  char s[20],s1[1];
  printf("\nEnter a string: ");
  scanf("%[^\n]",s);
  fflush(stdin);
  printf("\nEnter character: ");
  gets(s1);
  p=strpbrk(s,s1);
  printf("\nThe string from the given character is: %s",p);
  return 0;
}




Alogrithm:
**






3. Write a c program to delete the all consonants from given string.


Post a Comment