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.


6 comments:

Anonymous said...

does not work

Anonymous said...

How can we write a Name ex. Ram with astray-'*'?

Unknown said...

1) write a c program to implement
*scan a sentence from keyboard
** store it as a square matrix.padds blanks if necessary
*** remove the rows having duplicates
**** remove the columns having duplicates
***** display the final matrix.

ex: onionorangeiecepar
matrix: onion
orang
eniec
epar

after removing duplicate rows:
orang
epar

after removing duplicate columns:
orng
epr


Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Unknown said...

Please explain what is going to solve (problem is not clear)