CSC209H5 Lecture Notes - Lecture 3: Segmentation Fault, Gnu Compiler Collection
Document Summary
Csc209h5s - software programming and tools (winter 2018) Lecture 3: arrays, pointers and arguments (jan 22, 2018) Notes by jonathan ho: each example below contains an independent code fragment. In each case there are variables x and y that are missing declaration statements. In the boxes to the right of the code write declaration statements so that the code fragment would compile and run without warnings or errors. Declaration for y int int * char int ** pointer of pointer double ** double ** *p = address of f (float) x = address of p (float *) float ** f = 4. 5 (float) p float * x float ** y 4. 5 (float) y = x(x+0) Fix the program by changing the signature of the function to use a pointer. Void lie( int age) { printf( "you are %d years old\n" , age); age += 1 ; printf( "you are %d years old\n" , age); int main() {