q1 Flashcards

(9 cards)

1
Q

How does C manage memory

A

C: Uses manual memory management. You must allocate memory using malloc or calloc and release it using free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does LISP manage memory

A

Uses automatic garbage collection. The runtime manages allocation and deallocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is C typed

A

Is statically typed; types are fixed and checked at compile time (e.g., int, char*)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is Lisp typed

A

dynamically typed; variables do not have fixed types and type checking occurs at runtime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Lisp Code-Data Relationship

A

Is homoiconic, meaning code and data share the same representation (S-expressions/lists). This allows programs to manipulate their own source code (metaprogramming)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

C Code-Data Relationship

A

Is not homoiconic; code is distinct from data, and the programmer cannot easily modify language structure at runtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

C Syntax

A

Uses a statement-based syntax with keywords, semicolons, and curly braces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Lisp Syntax

A

Uses a minimalist, uniform syntax based on parentheses and prefix notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly