C Programming Flashcards
When and by who was C developed?
By Dennis Ritchie, in 1969
What other languages has C influenced?
C++, D, Go, Rust, Java, JS
List some formats of C.
A middle level language Free format Structured language user defined types Compact - 32 keywords Portable Efficient code Complete control C is case sensitive
What does expr1 ? expr 2 : expr3 mean?
if(expr1)
expr2;
else expr3;
What is a pointer?
Pointer is a variable that contains the address of another memory location
What does #define do?
it is a preprocessor that is used to define constants and macros.
symbolic constants make the program more readable and are usually in upper case.
What does #include do?
substitutes the line with the contents of the file before the program is compiled
When is #include commonly used?
To include header files, which contain function prototypes, constant definitions, macro definitions and structure definitions.
What are numeric arrays?
Arrays are used to group together a large amount of data which is of the same data type and meaning.
What is a function?
A function is a unique code module created to perform a specific task.
What are some purposes and advantages of functions?
Structured software Portability Reduce size of code Reduce debugging of code Better way to debug programs Code easily changed
What are local variables?
Local variables are data objects of any type which are declared within a function
What are global variables?
Data objects that are declared outside of a function.
What are some basic types of variables?
Automatic and static
What is an automatic variable?
Variable who’s value can be changed