fork(4) download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char str1[20];
  6. char str2[20];
  7. sscanf("Hello(World!)", "%[^(](%[^)])", str1, str2);
  8. printf("str1=\"%s\", str2=\"%s\"\n", str1, str2);
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
str1="Hello", str2="World!"