**Markdown**은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.
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 <stdio.h> | |
#define CNT_TEST 2 | |
int map[20]={0}; // save address info | |
int size=0; | |
int map2[20]={0}; // save address info | |
int size2=0; |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef struct sListElemt_{ | |
int data; | |
struct sListElemt_ *next ; | |
}sListElemt; | |
typedef struct sList_{ | |
int size; |
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 <stdio.h> | |
int *aa[10]={0}; | |
int (*bb)[10]={0}; | |
int cc[10]; | |
/* | |
Output | |
*aa[10]=40 byte (*bb)[10]=4 byte cc[10]=40 byte | |
*/ |
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 <stdio.h> | |
#include <string.h> | |
#define MAX_HASH 20 | |
#define HASH_KEY 0 | |
#define HASH_VAL 1 | |
static int hashmap[MAX_HASH][2]={0}; // open-addressing hash, pointer | |
static int hashsize=0; |
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 <stdio.h> | |
/* | |
refer to | |
https://en.wikipedia.org/wiki/Breadth-first_search | |
*/ | |
#define MAX_VERTEX 30 | |
int visit[MAX_VERTEX]={0}; | |
int map[MAX_VERTEX][MAX_VERTEX]={0}; |
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 <stdio.h> | |
#define MAX 50 | |
int a[] = { 99, 11, 29, 44, 17, 55, 63, 05, 22, 42, 15, 12 ,21 }; | |
int b[MAX]; | |
int merge_merging(int src[], int dst[], int start, int mid, int end) | |
{ |
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 <stdio.h> | |
//http://stackoverflow.com/questions/101439/the-most-efficient-way-to-implement-an-integer-based-power-function-powint-int | |
/* | |
all exponential values (e.g.5) was chaged to 2 system | |
* check even or odd | |
<-----------------------> | |
2^3 2^2 2^1 2^0 | |
0b 1 0 1 0 : 10 |
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
/* | |
Refer to https://github.com/meyerd/flex-bison-example | |
Definitions | |
C코드 삽입시 %{, }% 기호 | |
*/ | |
%option noyywrap // flex | |
%{ | |
#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
1. Execute make first. This will result in a netlinkKernel.ko output among many others. | |
2. Execute $ gcc netlinkUser.c -o netlinkUser | |
3. Insert kernel module by :$ sudo insmod netlinkKernel.ko | |
4. Run ./netlinkUser to see message and run dmesg to see debug messages | |
5. Remove module by : $ sudo rmmod netlinkKernel | |
6. Finally make clean to remove output files. |