it's been a while since I did any C coding...over 15 years, at least, so I may not be 100% correct here...
I believe C is pass-by-value. so, if you just had "scanf("%d", hourlyWage);", you'd be sending in a value 0 (assuming varibles get initialied...in C you might just get whatever junk was already in that memory space).
Instead, you want to pass the address of what hourlyWage points to, so that inside the scanf method, it can set the value. That way, when the funtion returns, your variable will now hold the correct value.
In your second example. you're simply setting it directly, so you don't need the ampersand.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie wrote:I searched for scanf() and this appears to be the best of a bad lot of results.
I think the linux man(ual) pages are pretty good as reference material for C standard library functions; don't know whether you looked at those? Might be a bit dry/heavy for beginners, but it's good to know they're there.