This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// server.c | |
// | |
// Computer Science 50 | |
// Problem Set 6 | |
// | |
// feature test macro requirements | |
#define _GNU_SOURCE | |
#define _XOPEN_SOURCE 700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Demonstrates difference between prefix and suffix decrement operators. | |
* From: http://stackoverflow.com/questions/4445706/post-increment-and-pre-increment-concept | |
*/ | |
#include <cs50.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* copy.c | |
* | |
* Computer Science 50 | |
* Problem Set 4 | |
* | |
* Copies a BMP piece by piece, just because. | |
*/ | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <math.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
int num_coins = 0; | |
float change_dollars; | |
do | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
* speller.c | |
* | |
* Computer Science 50 | |
* Problem Set 6 | |
* | |
* Implements a spell-checker. | |
***************************************************************************/ | |
#include <ctype.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Makefile | |
# | |
# Computer Science 50 | |
# Problem Set 6 | |
# | |
# compiler to use | |
CC = clang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
* dictionary.h | |
* | |
* Computer Science 50 | |
* Problem Set 6 | |
* | |
* Declares a dictionary's functionality. | |
***************************************************************************/ | |
#ifndef DICTIONARY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
* dictionary.c | |
* | |
* Computer Science 50 | |
* Problem Set 6 | |
* | |
* Implements a dictionary's functionality. | |
***************************************************************************/ | |
#include <stdbool.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0. A lung disease that is otherwise known as silicosis, it is caused by inhaling very fine ash or silica dust. | |
1. It provide measures of the resources used by the current process or its terminated and waited-for child processes. | |
2. 16 | |
3. Passing them by reference would allow us access to each of the individual members of the struct. | |
4. The for loop executes each time (so long as) the EOF has not been read. It first checks if the character being read is alphabetical or an apostrophe. If it is, it appends the character to the corresponding index of the array "word" and increases the index by 1 so that the next character read can be stored in the next memory location of the array "word". If the character read is neither alphabetical nor an apostrophe, a while loop iterates over that word, character by character, until a non-alphanumerical character is read, setting the index to zero on every iteration so that the array "word" can begin storing the next alphabetical string. In the event that an apostrophe is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* recover.c | |
* | |
* Computer Science 50 | |
* Problem Set 5 | |
* | |
* Recovers JPEGs from a forensic image. | |
*/ | |
#include <stdio.h> |
NewerOlder