Basics of C Programming Flashcards
(40 cards)
What does the term ‘imperative’ describe in programming?
Describes computation in terms of statements that change a program state.
What is the opposite of imperative programming?
Declarative programming.
What are the two main programming paradigms associated with C?
- Procedural
- Functional
Is C a compiled or interpreted language?
Compiled.
What type of typing does C use?
Statically, weakly typed.
What does it mean for C to be statically typed?
Types are checked before runtime.
What does weakly typed mean in the context of C?
Supports implicit type conversions.
On what platforms is C available?
Pretty much every platform.
What is a key characteristic of C regarding portability?
Very fast.
What feature does C provide for memory management?
Explicit memory management.
What standards does C adhere to?
ANSI/ISO standards.
True or False: C has runtime error checking.
False.
What type of error handling is lacking in C?
Sophisticated exception handling.
What does GNU stand for?
GNU stands for ‘GNU’s Not Unix’.
What types of software packages does the GNU system include?
- Compilers
- Libraries
- Tools
What is GCC?
GNU Compiler Collection, a compiler for multiple languages (C, C++, Java, etc.).
What command is used to compile a C program with GCC?
gcc myProgram.c
What is the default name of the executable file created by GCC?
a.out
How can you run the compiled program in Linux?
./a.out
How can you specify a custom output file name when compiling with GCC?
Use -o: e.g., gcc myProgram.c -o myProgram
What is the purpose of compiling to an object file?
Object files are portable and allow linking without source code.
What command is used to compile a C program into an object file?
gcc -c myProgram.c -o myProgram.o
What command is used to link an object file and create an executable?
gcc myProgram.o -o myProgram
Command to compile multiple source files at once?
gcc circle.c radius.c -o circle -lm