lab5 notes

lab5 notes - Pointer to functions Double (*funcptr)...

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

View Full Document Right Arrow Icon
Pointer to functions Double (*funcptr) (double,double); Double= result; Funcptr = pow; Result= (*funcptr) (1.5,2.0); Result = funcptr (1.5,2.0); Typedef struct point {double x, y:} Point_t; Typedef struct { Point_t top_left; Point_t bottom_right; }Rectangle_t; Dynamic memory management Malloc(size_t size): allocates a block of memory whose size is at least size. Free ()void * ptr : frees the block of moneyr Opening and closing files File*fopen(const char* restrict filename; const char* restrict mode)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Int fclose(file *fp); Common streams and their file pointers Standard input: stdin Standard output: stdout Standard error: stderr Reading char Reading/writing char Getc() Printf() Fprintf output things to file Fscanf read things from a file Compiling Gcc –g –o foobar foobar.c The –o opting indicates the name of the binary /prom to be generated The –g option indicates ito include symbol and source -0line infor for debugging Man gcc for more details Cs.ucla.edu/~mvle/cs35l/gdbcs.pdf Displaying source code
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/01/2009 for the course CS 187105201 taught by Professor Eggert during the Spring '09 term at UCLA.

Page1 / 5

lab5 notes - Pointer to functions Double (*funcptr)...

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

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