All pastes #26510 Raw Edit

Anonymous

public text v1 · immutable
#26510 ·published 2005-10-24 18:28 UTC
rendered paste body
/* strtok example */
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
int main ()
{
  char str[100];
  char * pch;
  int a,b;
  pch = strtok (str," ");
  gets(str);
  
  while (pch != '\0')
  {
    a=atoi(pch);
    pch = strtok ('\0', " ");
   
    b=atoi(pch);    
    break;
        
  }  
  printf ("%d\n",a);
  printf ("%d",b);
  getch();
  return 0;
}