Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
12
08-03.md
12
08-03.md
|
|
@ -29,7 +29,7 @@
|
|||
in this variable-sized block */
|
||||
};
|
||||
|
||||
/* Structure that contains one element of the array we’ll search */
|
||||
/* Structure that contains one element of the array we'll search */
|
||||
struct DataElement {
|
||||
unsigned int ID; /* ID # for array entry */
|
||||
unsigned int Value; /* Value of array entry */
|
||||
|
|
@ -42,8 +42,8 @@
|
|||
struct DataElement *WorkingDataPointer;
|
||||
struct BlockHeader **LastBlockPointer;
|
||||
|
||||
printf(”ID # for which to find average: “);
|
||||
scanf(”%d”,&IDToFind);
|
||||
printf("ID # for which to find average: ");
|
||||
scanf("%d",&IDToFind);
|
||||
/* Build an array across 5 blocks, for testing */
|
||||
/* Anchor the linked list to BaseArrayBlockPointer */
|
||||
LastBlockPointer = &BaseArrayBlockPointer;
|
||||
|
|
@ -71,10 +71,10 @@
|
|||
/* Remember where to set link from this block to the next */
|
||||
LastBlockPointer = &WorkingBlockPointer->NextBlock;
|
||||
}
|
||||
/* Set the last block’s “next block” pointer to NULL to indicate
|
||||
/* Set the last block's "next block" pointer to NULL to indicate
|
||||
that there are no more blocks */
|
||||
WorkingBlockPointer->NextBlock = NULL;
|
||||
printf(”Average of all elements with ID %d: %u\n”,
|
||||
printf("Average of all elements with ID %d: %u\n",
|
||||
IDToFind, FindIDAverage(IDToFind, BaseArrayBlockPointer));
|
||||
exit(0);
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
}
|
||||
}
|
||||
/* Point to the next block, and continue as long as that pointer
|
||||
isn’t NULL */
|
||||
isn't NULL */
|
||||
} while ((BlockPointer = BlockPointer->NextBlock) != NULL);
|
||||
/* Calculate the average of all matches */
|
||||
if (IDMatchCount == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue