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?
Printable View
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. :confused:
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
solidusMGS?
More like gaseousMGS!
Am I right people?!
People???
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.
> Space is important?
In printf and scanf format strings it is.