This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: contents s scanf(%d,&a); s * s after a type name in a declaration, it means it is storing an address to something of that type s int *p; s before a variable name in lines that are not declarations of variables, it means to follow that pointer as a map to find the actual variable s printf(%d\n,*p); 3 Variables: Scoping Rules and Storage Classes s Scopes s Where the variable is visible s Options s local scope s global scope/file scope s Storage Classes s Where and how long the variable remains in existence s Options s automatic s register s static s extern Random Number Generation s provided in <stdlib.h> s function: rand s function: srand s constant: RAND_MAX s teminolody: random, pseudorandom, seed s function provided in <time.h> s time Character input and output s in <stdio.h> s function: getchar s function: putchar s constant: EOF s Using them in Loops...
View Full Document
- Fall '07