wendyyue wrote:
scanf("%d%s", **&**len1, (str1) ); scanf("%d%s", **&**len2, (str2) );
if you specified parameters for scanf correctly, the above, then the stack overflow is due to the stack allocation int count[10001][10001]; which is "10001 * 10001 * sizeof (int)" which is very large than the default stack size which is 1MB. To increase the stack size /STACK (Stack Allocations)[^]. It is better to allocate in heap. And also array size in main 1001 and size in MinOperation 10001 check it for logic of your program (Any way int count[1001][1001] is also going to issue stack overflow).