Visual Studio Code – Why does this code work as expected if I use Visual C(Visual Sudio 2022) but doesn't if I use gcc 8.2?
I am new to C and still learning(currently doing some "LeetCode" challenges). I wrote a function that should return the longest common prefix in an array of strings. I tested with a couple different values and all works fine. But…