C Programming 01/2 Flashcards
What is #include?
Pre-processor directive which inserts a file into the source code. These are commonly called ‘header files’ and given the extension ‘.h’
What is #define?
Pre-processor directive which allows the definition of macros within your source code
What is the difference between declare and defining?
Declaring a variable or function creates the name but no value/functionality
Defining a variable or function creates the name and associated value/functionality
What is a function prototype?
A function prototype lets you declare a function, without its body
What is a header file?
A file which is designed to be included in multiple files, and often contain function prototypes
What is typedef?
Use typedef to give new names to types e.g typedef oldname newname1, newname2; or typedef unsigned int day, month;
What is casting?
- Converts a value from one type to another.
- Casting may be implicit or explicit.
- There is no error checking on casting.
What is static?
This variable or function is unique to this file
What is extern?
This variable will be declared in some other file but I will use it here