Skip to content

Instantly share code, notes, and snippets.

@macrat
Created October 23, 2015 03:42
Show Gist options
  • Select an option

  • Save macrat/5c9f314fcd22055a0d84 to your computer and use it in GitHub Desktop.

Select an option

Save macrat/5c9f314fcd22055a0d84 to your computer and use it in GitHub Desktop.
昨日のプログラミングの講義の課題らしいです。
#include <stdio.h>
int main(int argc, char** argv){
char* itr = argv[2];
while(itr = strstr(itr, argv[1]))
printf("%d\n", (int)(++itr-argv[2]));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment