Advertisement
sellmmaahh

OR-tut11-zad4_4

Aug 8th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. char* rijec(char* string) {
  5.     char *poc=string;
  6.     int i=0, br=0;
  7.     while (*string==' ' && *string!='\0') string++;
  8.     while (*string!=' ' || *string=='\0') string++;
  9.     if (*string!='\0') *string='\0';
  10.     return poc;
  11. }
  12. int main () {
  13.     char s[]="Danas je lijep dan";
  14.     printf("%s",rijec(s));
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement