c_cheat_sheet

c_cheat_sheet - Computational Form Jared Schiffman Fall...

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

View Full Document Right Arrow Icon
Computational Form Jared Schiffman Fall 2007 C/C++ Cheat Sheet (v1) libraries #include <stdio.h> input and output functions #include <string.h> string related functions #include <stdlib.h> memory allocation, rand, and other functions #include <math.h> math functions #include <time.h> time related functions functions returnType functionName( input1Type input1Name, input2Type input2Name, . ... ) { // do something return value; // value must be of type returnType } comments // one line comments this is a C++ style one line comment /* multiple line this is a traditional C style comment block comment */ variable types char holds a character, or a number from -128 to 127 (1 byte) bool holds a boolean value, either true or false (1 byte) int hold an integer (a positive or negative number with NO decimal, 4 bytes) float holds a real number (a positive or negative number with a decimal, 4 bytes) void no type, raw binary data conditionals A == B if A is equal to B, this is true; otherwise, it’s false
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.

This document was uploaded on 11/16/2011.

Page1 / 2

c_cheat_sheet - Computational Form Jared Schiffman Fall...

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