Advertisement
mtrower

splitstring.c

Jan 15th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "decode.c"
  3.  
  4. void main() {
  5.     int idx = 0;
  6.     int *nums;
  7.     char buf[4096];    
  8.  
  9.     printf("#: ");
  10.     scanf("%s", buf);
  11.     nums = decode(buf);
  12.  
  13.     while (++idx <= nums[0]) {
  14.         printf("num %i: %i\n", idx, nums[idx]);
  15.     }
  16.  
  17.     free(nums);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement