I am getting a segmentation fault while running this code. I can't work out why this is happening - can anyone see a possible reason? (I have already got and initialized ...
Sometimes this program errors with a segmentation fault. What is a segmentation fault? Why is it happening? And how do I fix it?
I am expecting the output as: