Hello guys, I have a double pointer char **input that has its double pointer part mem allocated but its input[i] part not mem allocated yet. Because its input[i] part not mem allocated, shouldn't these two codes elicit 0xC000000005 error in the main function? I am only starting to get my error when I start including input[2]. Can someone explain this to me?
malloc doesn't initialize the memory returned, so there's no telling what's in input[0] and input[1] at lines 21 and 22. In addition, you're telling printf to print a floating point value but you're passing in a single character. So there's no telling what it will print.