diff --git a/client_server/tcp_full_duplex_client.c b/client_server/tcp_full_duplex_client.c index 2fb2bb79..25c21b46 100644 --- a/client_server/tcp_full_duplex_client.c +++ b/client_server/tcp_full_duplex_client.c @@ -10,7 +10,7 @@ * instead of the server only sending and the client only receiving data, * The server and client can both send and receive data simultaneously. This is * implemented by using the `fork` function call so that in the server the child - * process can recieve data and parent process can send data, and in the client + * process can receive data and parent process can send data, and in the client * the child process can send data and the parent process can receive data. It * runs an infinite loop and can send and receive messages indefinitely until * the user exits the loop. In this way, the Full Duplex Form of communication diff --git a/client_server/tcp_full_duplex_server.c b/client_server/tcp_full_duplex_server.c index 29a7ca30..da3635c6 100644 --- a/client_server/tcp_full_duplex_server.c +++ b/client_server/tcp_full_duplex_server.c @@ -10,7 +10,7 @@ * instead of the server only sending and the client only receiving data, * The server and client can both send and receive data simultaneously. This is * implemented by using the `fork` function call so that in the server the child - * process can recieve data and parent process can send data, and in the client + * process can receive data and parent process can send data, and in the client * the child process can send data and the parent process can receive data. It * runs an infinite loop and can send and receive messages indefinitely until * the user exits the loop. In this way, the Full Duplex Form of communication diff --git a/data_structures/binary_trees/words_alphabetical.c b/data_structures/binary_trees/words_alphabetical.c index 1b0c42e5..46508f48 100644 --- a/data_structures/binary_trees/words_alphabetical.c +++ b/data_structures/binary_trees/words_alphabetical.c @@ -9,7 +9,7 @@ * where words are separated by a space, newline, or underscore. * This program prints (writes or outputs) to another file (`wordcount.txt`), * the individual words contained in 'file.txt' with their frequencies (number - * of occurences) each on a newline and in alphabetical order. This program uses + * of occurrences) each on a newline and in alphabetical order. This program uses * the binary tree data structure to accomplish this task. * @author [Randy Kwalar](https://github.com/RandyKdev) */ @@ -28,7 +28,7 @@ struct Node { char *word; ///< the word (value) of the node - uint64_t frequency; ///< number of occurences of the word + uint64_t frequency; ///< number of occurrences of the word struct Node *left; ///< pointer to the left child node struct Node *right; ///< pointer to the right child node }; diff --git a/data_structures/linked_list/circular_linked_list.c b/data_structures/linked_list/circular_linked_list.c index 7297217a..6d923ae7 100644 --- a/data_structures/linked_list/circular_linked_list.c +++ b/data_structures/linked_list/circular_linked_list.c @@ -16,7 +16,7 @@ struct node *first=NULL ; struct node *last=NULL ; /* first and last are global variables and need not be passed to any function. Any changes made to variables first and last by any of the functions in the program will be reflected in the entire program */ -/* This function is responsible for creating the Circularly Linked List right from the BEGINING. */ +/* This function is responsible for creating the Circularly Linked List right from the BEGINNING. */ void create() { int i , n ; diff --git a/data_structures/linked_list/stack_using_linked_lists.c b/data_structures/linked_list/stack_using_linked_lists.c index bf16ec2f..a3c473a7 100644 --- a/data_structures/linked_list/stack_using_linked_lists.c +++ b/data_structures/linked_list/stack_using_linked_lists.c @@ -48,7 +48,7 @@ void push(struct node *p) temp->link = top; top = temp; - printf("Inserted succesfully.\n"); + printf("Inserted successfully.\n"); } void pop(struct node *p) { diff --git a/developer_tools/min_printf.h b/developer_tools/min_printf.h index 69dec7a6..b58db13d 100644 --- a/developer_tools/min_printf.h +++ b/developer_tools/min_printf.h @@ -159,7 +159,7 @@ void print_int_value(int n, int width, int precision) while (n > 0) { *s++ = n % 10 + '0'; // Converts last digit of number to character and store it in p - ++size; // Increment size variable as one more digit is occured + ++size; // Increment size variable as one more digit is occurred n /= 10; // Removes the last digit from the number n as we have successfully stored it in p } *s = '\0'; diff --git a/exercism/word_count/word_count.c b/exercism/word_count/word_count.c index 206a16dc..ac2ceea4 100644 --- a/exercism/word_count/word_count.c +++ b/exercism/word_count/word_count.c @@ -70,7 +70,7 @@ int word_count(const char *input_text, word_count_word_t *words) words->count = 0; - /* make sure none error is occured */ + /* make sure none error is occurred */ if (loop) { /* collects the last word up to the \0-character. and counts it.*/ @@ -88,4 +88,4 @@ int word_count(const char *input_text, word_count_word_t *words) /* returns the number of words or an error code */ return count_all; -} \ No newline at end of file +} diff --git a/graphics/spirograph.c b/graphics/spirograph.c index 2a4aebc1..2615bf7d 100644 --- a/graphics/spirograph.c +++ b/graphics/spirograph.c @@ -131,7 +131,7 @@ static inline void glutBitmapString(void *font, char *string) * * @param x array containing absicca of points (must be pre-allocated) * @param y array containing ordinates of points (must be pre-allocated) - * @param N number of points in the the arrays + * @param N number of points in the arrays */ void display_graph(const double *x, const double *y, size_t N, double l, double k) diff --git a/machine_learning/kohonen_som_trace.c b/machine_learning/kohonen_som_trace.c index c893bd02..8ca54218 100644 --- a/machine_learning/kohonen_som_trace.c +++ b/machine_learning/kohonen_som_trace.c @@ -6,7 +6,7 @@ * \details * This example implements a powerful self organizing map algorithm. * The algorithm creates a connected network of weights that closely - * follows the given data points. This this creates a chain of nodes that + * follows the given data points. This creates a chain of nodes that * resembles the given input shape. * \author [Krishna Vedala](https://github.com/kvedala) * \see kohonen_som_topology.c diff --git a/searching/floyd_cycle_detection_algorithm.c b/searching/floyd_cycle_detection_algorithm.c index 44c48177..285a72c6 100644 --- a/searching/floyd_cycle_detection_algorithm.c +++ b/searching/floyd_cycle_detection_algorithm.c @@ -24,7 +24,7 @@ */ uint32_t duplicateNumber(const uint32_t *in_arr, size_t n) { - if (n <= 1) { // to find duplicate in an array its size should be atleast 2 + if (n <= 1) { // to find duplicate in an array its size should be at least 2 return -1; } uint32_t tortoise = in_arr[0]; ///< variable tortoise is used for the longer diff --git a/sorting/radix_sort_2.c b/sorting/radix_sort_2.c index 9d6cabb2..e527e92f 100644 --- a/sorting/radix_sort_2.c +++ b/sorting/radix_sort_2.c @@ -22,7 +22,7 @@ void countSort(int *arr, int n, int place) int i, freq[range] = {0}; int *output = (int *)malloc(n * sizeof(int)); - // Store count of occurences in freq[] + // Store count of occurrences in freq[] for (i = 0; i < n; i++) freq[(arr[i] / place) % range]++; // Change freq[i] so that it contains the actual position of the digit in