Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- char* funkcija(char *s, char c, char nova[])
- {
- int br=0;
- char*p=nova;
- int i=0;
- int log=0;
- while(*s!='\0')
- {
- if(log==0)
- {
- if(*s==c && *(--s)==' ')
- { s++;
- while(*s!=' '){
- s++;
- }
- *p++=*s++;
- log=1;
- }
- }
- *p++=*s++;
- }
- *p = '\0';
- return nova;
- }
- int main()
- {
- char rijec[100]= {"izbaci PRVU rijec koja Tpocinje sa zadatim Tznakom"};
- char nova[100];
- char*p;
- p=funkcija(rijec,'T',nova);
- while(*p!='\0')
- {
- printf("%c", *p);
- p++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement