Source: https://github.com/MaJerle/c-code-style
This document describes C code style used by Tilen MAJERLE in his projects and libraries.
Source: https://github.com/MaJerle/c-code-style
This document describes C code style used by Tilen MAJERLE in his projects and libraries.
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
struct Point { | |
char index; | |
int x, y; | |
}; | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct node { | |
int value; | |
struct node *next; | |
} Node; | |
Node *make_node(int value, Node *next){ |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
typedef struct node { | |
int value; | |
struct node *left; | |
struct node *right; | |
struct node *parent; | |
} Node; |
#include <stdio.h> | |
#include <stdlib.h> | |
#define COEFFIECIENT 2 | |
typedef struct { | |
int capacity, used_size; | |
int *data; | |
} Vector; |
#include<stdio.h> | |
#include<stdlib.h> | |
#define maxn 15 | |
int n, m, k; | |
char G[maxn][maxn]; | |
int fire[maxn][maxn] ; | |
struct point { |
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAX 1000000 | |
char* get_str(); | |
void sort(char**, int); | |
int main() { | |
// input: amirhosein amir alireza mohsen mohammad |
We are going to implement a simple downloader.
In this applcation, we can download multiple resources at the same time. But with a limitation.
The limitation is that we can download at most N files simultaneously. For example, if N is equal to 3, we can download 3 files at the same time. Then, when one of the threads has completed downloading a file, another thread will start its process.