CS 2022 Notes

CS 2022 Notes - Functions and Make C Math.h Pow(a.b) a^b...

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

View Full Document Right Arrow Icon
Functions and Make C Math.h Pow(a.b) – a^b Exp(a) – e^a Log(a) – lna <derivatives> <Functions> ____header Body Emphasize Robustness and Speed In blocks – variables must be declared in the beginning Make sure all paths have a return value Call by value Values don’t actually switch when called… Recursion No Boolean statements in C Definition and Declarations Declaration -> no space set aside in current stack (extern int i) Shared among source files so only one copy Header Files (unique to C/++) #include<stdio.h> Allow you to keep your actual code hidden Brackets – search for header file in /user/include (system header files) Double Quotes - search current directory To Compile, $GCC –O/ *.c.-o test Use Makefile (Unix Tool) Put makefile into projects which allows you to basically make shortcuts Runs Default GCC and make clean Pointers (variable contains address of a variable Way to express computation Compact and efficient
Background image of page 1

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

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

This note was uploaded on 10/25/2011 for the course CS 2022 taught by Professor Crandall during the Spring '08 term at Cornell.

Page1 / 2

CS 2022 Notes - Functions and Make C Math.h Pow(a.b) a^b...

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