C Basics Flashcards
main()
Identity of the start of the program, with every C program having a main().
main is a C keyword, and should not be used for any other variable.
Statements
A specification of an action to be taken by the machine as the program executes, with each one ending with a semicolon.
Identifiers
Words used to represent certain program entities.
Example include:
int my_int;
Void CalulateArea (int radius)
The first one represents a program variable, the second represents a function name.
Rule for identifiers
- can contain mix of characters and numbers
- cannot start with number
- must start with letter or underscore
- cannot contain arithmetic operations
- cannot contain a space
- cannot be any other punctuation marks
- cannot be reserved keywords
- case sensitive
Integers
Positive and negative whole numbers.
int i = 1;
Unsigned Integers
Positive whole numbers.
Floating Point Numbers
Real numbers.
Chars
Letters in English.
Constants
Fixed values.
const a = 1;