C_Crib_Sheet_Exam_1[2]

C_Crib_Sheet_Exam_1[2] - Non recursive function that...

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

View Full Document Right Arrow Icon
Non recursive function that computes factorials int fact( int num) { int val; if(num<=1) return 1; val=num; while(--num>1) val *=num; return val; } Description Operator Assoc. from Precedence Function expr ( ) ^ | High Array expr [ ] | (Eval first) Struct indirection -> | | ^ | Struct member . Left | Inc/decr ++ -- | One’s complement ~ ^ | | | Unary not ! | | Address | | dereference * | | Cast (type) | | Unary plus + | | Unary minus - | | Size in bytes Sizeof Right | Multiplication * ^ | Division / | | Modulus % | | Addition + | | Subtraction - | | Shift left << | | Shift right >> | | Less than < | | Less than or eq <= | | Greater than > | | Greater or eq >= | | Equal == | | Not equal != | | Bitwise and | | Bitwise exclusive or ^ | | | | Bitwise inclusive or | | | | | Logical and | | Logical or || Left | Conditional ? : Right | Assignment = %= += -= /= >>= <<= &= ^= |= ^ | | (Eval last) comma , Left LowEx #include-Include the contents of a text file. #define-Define a macro. #undef-Cancel a previous #define. #if-If a test succeeds, take specified actions. #ifdef-If a macro is defined, take specified actions #ifndef-Opposite of #if,#ifdef,#ifndef #elif-“else if” a way around nested #if-#else #line-Set line number for the compiler to use when issuing warning
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.

Page1 / 2

C_Crib_Sheet_Exam_1[2] - Non recursive function that...

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