Good Morning, There is a bug in my code and I have been trying to figure out why its happening, I have never seen a bug like this and in the main function when I print out the queried first name and last name, it properly reads and prints out, but for some reason if you look in my code on line 314, it is not printing out last name and printing a blank, instead. This causes my find_closest_birthday function to not work properly because it depends on strcmp'ing the first and last name. Any clue on what might be causing this? It would really help if you could take a look at my code and help point me in the right direction.
Code: [C] # include <stdio.h> # include <stdlib.h> # include <string.h> # define MAX - Pastebin.com
Output: [Bash] Terminal output - Pastebin.com
At the time I didn't realize there was a weird for-loop at line 92, anyhow I ended up commenting out that for loop but I get the same bug.
The output should be:
but its only outputting, with the missing queried last name.Code:j = 0 i = 0 classmate_First Name = JOHN classmate_Last Name = SMITH Queried_First Name = JOHN Queried_Last Name = SMITH
Code:j = 0 i = 0 classmate_First Name = JOHN classmate_Last Name = SMITH Queried_First Name = JOHN Queried_Last Name =
Any reason why its doing this?
Edit: Sorry for link instead of using the code blocks... Hope it doesn't matter.