Sample Exercises for Quiz 5

SPARC Architecture, Assembly Language Programming, and C (2nd Edition)

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sample Exercises for Quiz 5 Sample Exercises for Quiz 5 Runtime Segments & Linking, SPARC machine instructions, I/O, Memory Management, Traps/Exceptions If we have not covered a particular set of topics in class, you will not be help responsible for them on this Quiz, but probably for the Final. Recursion! Name the 5 basic Unix C Runtime sections and describe the function of each section. What sections are part of the executable file on disk. Starting with a C source file, list the order of each of the main parts of the compilation and loading process through to the point of execution of the program. What are the main functions of the linkage editor/linker? the loader? Given the following program, name where each variable/constant/memory allocation is stored in the C Runtime environment. What is the scope/visibility and lifetime of each? extern int external_global; int global1 = 5; int global2; static int external_static1 = 7; static int external_static2; extern int foo( int * ); /* function prototype */ int main( int argc, char *argv[] ) { char *chPtr = NULL; int *iPtr; int (*ptf)( int * ); static int internal_static1 = 11; static int internal_static2; iPtr = (int *) malloc( 40 ); chPtr = "Hello World"; ptf = foo; /* (*ptf)( iPtr ); to make the function call */ http://ieng9.ucsd.edu/~cs30x/Exercises5.html (1 of 4) [2/8/2008 1:43:32 PM]
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 02/11/2008 for the course CSE 30 taught by Professor Ord during the Winter '08 term at UCSD.

Page1 / 4

Sample Exercises - Sample Exercises for Quiz 5 Sample Exercises for Quiz 5 Runtime Segments Linking SPARC machine instructions I/O Memory

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online