Electgpl

PIC - Separador de trama

Dec 14th, 2015
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. char linea[]="string1 29873219487 19824723 4980192 3123";
  4. char separador[]=" ";
  5. char *trama=NULL;
  6. main(){
  7.     trama=strtok(linea,separador);
  8.     while(trama!=NULL){
  9.         printf("%s \n",trama);
  10.         trama=strtok(NULL,separador);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment