fork(16) download
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5. int main()
  6.  
  7. {
  8.  
  9. char str[] = "192.168.0.100/act?bla=other";
  10.  
  11. char key[20];
  12.  
  13. char buf[100];
  14.  
  15. sscanf(str, "%*[^?]?%[^=]=%s", key, buf);
  16.  
  17.  
  18.  
  19. printf("<%s>\n", key);
  20.  
  21. printf("<%s>\n", buf);
  22.  
  23. return 0;
  24.  
  25. }
  26.  
  27.  
Success #stdin #stdout 0.02s 1676KB
stdin
Standard input is empty
stdout
<bla>
<other>