[SOLVED] CS data structure Carnegie Mellon

$25

File Name: CS_data_structure_Carnegie_Mellon.zip
File Size: 310.86 KB

5/5 - (1 vote)

Carnegie Mellon
Referencing Nonexistent Variables
Forgetting that local variables disappear when a function returns
int *foo () {
int val;
return &val
}
1

Carnegie Mellon
Freeing Blocks Multiple Times Nasty!
x = malloc(N*sizeof(int));
free(x);
y = malloc(M*sizeof(int));
free(x);
2

Carnegie Mellon
Referencing Freed Blocks Evil!
x = malloc(N*sizeof(int));

free(x);
y = malloc(M*sizeof(int));
for (i=0; i val = 0;
head->next = NULL;

}

free(head);
return;
5

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS data structure Carnegie Mellon
$25