do you speak english? did you read the 2 posts that explained to you (i agree salem did it more gracefully than me) that the behavior of the said example is undefined? i already knew it was defined, but i compiled it on the three compilers i have available to me, just so i could illustrate more clearly to you your error. gcc 22.214.171.124 of djgpp output radius=48. pacific for dos v7.51 output radius=48. lcc for windoze v2.5 output radius=47. now a piece of code that produces 2 different outputs on 3 perfectly functional c compilers is crap. the compilers say its crap. the ansi standard says its crap. he says its crap. we say its crap. you teach it to your students, they WONT say its crap. so dont teach crap.Originally posted by Mister C
Thanks for all your help in giving real good test questions. Also, thanks for all of the suggestions to make my testing and course better. I forgot to post the answer to my test question. the answer is D. radius = 48.
Continue to post questions as I will check back when I have time.