Final study Flashcards
(46 cards)
define a macro named MULT that multiplies a value by itself 3 times
define MULT(x) ((x)(x)(x))
.so
dynamic, runtime
volatile
can be modified outside the program
-O1 (Optimization flag)
compare multiple lines
Create a target in a Makefile called “wave” that checks if file1.c or file2.c changes
wave: file1.c file2.c
compile file1.o file2.o using the shared my_math library into “shared”
gcc file1.o file2.o -shared -o libmy_math.so
assign a new SDL_window pointer to window and name it “name” of size 4x7 in a 64 bit system
SDL_Window *window = SDL_CreateWindow( “name”, int w, int h, Uint64 flags);
clean: target in makefile
removes any build artifacts
”s” in -crvs
creates an index
“c” in -crvs
creates the archive
create a library using file1.o file2.o and libmy_math.a
ar -crvs libmy_math.a file1.o file2.o
-O3 (Optimization flag)
function inlining, loop unrolling
bt in gbt
back trace
extern
can be used through many modules
destroy an open window pointer named window
SDL_DestroyWindow(window);
-O2 (Optimization flag)
doesnt generate longer code
.a
static, executable
default target in a makefile
all:
assign a struct a function pointer called func that takes an int and string pointer and returns a double
double(*func)(int, char *);
read 1 number from a binary file named rng into an int n
fread(&n, sizeof(int), 1, rng)
3rd to be assigned in the stack
local variables
-Ofast (Optimization flag)
optimize for speed
how to link a library
-l<name></name>