Hello. I have a M1 Mac mini with MacOS 12.1 (MacOS Monterey).
I have written a C++ program in the inbuilt vim text editor for sorting an Array of integers in ascending order using Merge Sort Algorithm. The compiler I am using is the official Clang compiler. MI tried the g++ command as well as clang++ command to compile the program. (Actually both the commands run clang compiler only)
The weird thing I am facing is that sometimes it replaces some integers in the output with random integers. I have attached the screenshot. But this behaviour is not observed when I copied the same program in my windows PC.
Please help in this regard.
I am attaching the C++ program file as well as the screenshot of the output.