So, after I code something on codeblocks for C. The window that comes up always differs from one another. So, if I run it once, it will look different from when I run it the second time. How do I fix this?
So, after I code something on codeblocks for C. The window that comes up always differs from one another. So, if I run it once, it will look different from when I run it the second time. How do I fix this?
I doubt anyone understands that.
A little inaccuracy saves tons of explanation. - H.H. Munro
No it doesn't.
Different how?
Different position on screen - well, that's windows for you.
Different contents - well, that's your program.
Different termination message - maybe your program, if it says anything other than exit status 0.
Upload a couple of PNG format screen shots to a not-so-spammy image upload site like ImgBB — Upload Image — Free Image Hosting
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
solidusMGS?
More like gaseousMGS!
Am I right people?!
People???
A little inaccuracy saves tons of explanation. - H.H. Munro
Yes, it does. You just watch!
See for yourself: cboard — imgbb.com
Well it seems to me that your attempt to read the "last name initial" failed, because you used "%c" as the format.
Try instead a leading space in the format.
Next time, post your CODE.Code:char initial; printf("Enter initial"); scanf(" %c", &initial); /* space is important! */
Not vague "the screen is different"
Oh, and the last 2 lines are just code blocks reporting on whether your program was successful (that's the process returned 0 bit), and the execution time is well what it is - how long the program ran for.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
> Space is important?
In printf and scanf format strings it is.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.