Run-Time Check Failure #3 - The variable 'userguess' is being used without being initialized
What I am trying to do is get the randomly selected word to display on the screen as "*"s instead of letters. But I know my structure sucks and my code leeks in-experience. Could you advise on that as well please?
On line 145, you are using userguess in the for loop but you haven't input anything to it yet, or initialized it. Therefore it contains undefined data. Also, not sure why you are using a char variable in the test expression anyway. Since chars are stored as ascii code, this expression will convert that code to an int and write * into display word well beyond what that array should hold. For instance, say the use input an 'a'. The decimal value of that is 97. So that test expression would be seen as i < 97. That means you'd be writing 87 more elements past the end of displayword.
As was mentioned, secretword and displayword are both outside the bounds of the char arrays, so that line does nothing useful and could in fact be a crash. The behavior is undefined in any case.