Shorts Flashcards

1
Q

Pointers

A

Provides an alternate way to pass on data between functions
In C we pass a copy of the data when we pass data by value
Is nothing more than an address to a location where the memory lives

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

HDD

A

hard disk drive

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

SSD

A

solid-state drive

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

pointer is a data item whose

A

value is a memory address

type describes the data located at that memory address

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

pointer

A

can update variables

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

NULL

A

if no value for the pointer set it to this

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

How to create a pointer

A

extract the address of an already existing var
& address extraction operator
if x is the variable
then &x is a pointer who is valued at the address of x
&arr[i] is a pointer to double an array of doubles it uses the ith element

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

dereferencing

A

inspect or modify the location of which it points

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

pointer-to-char

A

*pc data lives inside pc

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

*

A

dereferencing operator
knowing the address but not going there
That’s, where * comes in u, go there

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

Dynamic Memory Allocation

A

every block that you malloc() must subsenquely be free() d
only memory that you malloc() musy be free()d
do not free() a memory block more then once

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

Segmentation Fault

A

Trying to acces memory that is not meant to be touched

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