Module 2 Flashcards

(5 cards)

1
Q

Why is the gets() function dangerous?

A

Because it reads input until a newline or EOF without checking the buffer size so it can easily cause overflow

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

What is a segmentation fault?

A

An error when the CPU tries to read or ex ecute memory that’s invalid, unmapped, or non-executable

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

Where is the small return value typically stored and why there?

A

EAX register because its a general-purpose register that compilers conventionally use to pass back results from a function

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