Home
Flashcards
Preview
cpsc 213
Home
Get App
Take Quiz
Create
How do you allocate a dynamic array of object "
int x
" and of size "
n"?
(x*)malloc(n*sizeof(x));
what might a constructor for the C code look like?
//Point
typedef struct{
float x;
float y;
} Point;
void construct_point(Point* point, float newX, float newY){
point->x = newX;
point->y = newY;
}
Left shift by k bits, x << k =
x*2
k
x >> k =
x/2
k
1 byte =
8 bits
a static variable's storage is allocated...
before the program starts
a dynamic variables storage is allocated...
during the program execution
Author
Anonymous
ID
203949
Card Set
cpsc 213
Description
assembly code, C, Computer Systems
Updated
2013-02-28T01:45:15Z
Show Answers
Home
Flashcards
Preview