Section One - C Primer Flashcards
Daemons
Program with no GUI and run in the background.
command line tools
Programs that run for a short time in terminal.
Function
A list of instructions for computer to execute.
Variable
Place where data is stored.
short, int, long
These three types are whole numbers.
float, double
Floating point number – a number that can have a decimal point.
char
One byte integer that we usally treat as a character.
pointers
A Pointer holds a memory address. Declared using a asterisk.
struct
A struct is a type made up of other types.
if/else
if (conditional) { // execute this code if the conditional evaluates to true } else { // execute this code if the conditional evaluates to false }
“==”
Are they equal?
“!=”
Are they not equal?
&&
Logical AND – true if and only if both are true.
||
Logical OR – false if and only if both are true.
!
Logical NOT – true becomes false, false becomes true.
boolean variable
A variable that can be true or false. BOOL someVarName =
else if
if (truckWeight <= 0) { printf("A floating truck\n"); } else if (truckWeight < 40000.0) { printf("A light truck\n"); } else { printf("A heavy truck\n"); }