COMP 206 Lecture Notes - Lecture 13: .Bss, Uninitialized Variable, Binary File
Document Summary
C compiler creates an executable binary file so that the operating system can run it and start a process. These hold program instructions, constant values, info about the number of variables necessary. Data segment: area where global variables are input. Bss segment: area where uninitialized variable is input-- when process begins to run, the. Stack: area where local variables are input (note: none of these variables exist in a. out file char c = a". This is stored as an integer number based on the ascii code. So, you can also store characters based on the code to which their character aligns ex. char c = 97 gives the same integer value as char c= a". Printf() control codes %c : tries to interpret data in the form of a character. %d or %i : tries to interpret data in the form of a signed integer. %s: string printf(%c, c) will print the character a" (from above example)