Week 2 - Types, Variables, and Functions Flashcards
how many bytes is a float?
4
how many bytes is an unsigned int?
4
how many bytes is VOID?
1
how many bytes is a char?
1
how many bytes is an int?
4
what is the variable if no storage class is specified?
automatic
What do all C programs have?
functions and variables
what is a if :
a = (4/3 + 5/3) * 1.5
3
define a function
a set of statements that specify operations to be performed
define a variable
a location in storage with a storage class and type
define automatic
discarded outside the block
define static
external to all blocks
What is the format of a function definition?
return_type f(arguments) {…}
What is the format of a variable declaration?
variable_type variable_name = variable_value;
how do you declare an array of 10 integers?
int a[10];