✔️ 포인터의 기본 c >c #include > #pragma warning (disable : 4996) > int main(void){ int a[5] = {10, 20, 30, 40, 50}; int* p; > //배열 이름은 배열의
메모리 동적 할당 >#include #include //malloc, free #pragma warning (disable : 4996) > int main(void) { int stNum; int* score; printf("학생 수 입력 :
구조체 c >c #include #include // malloc, free, rand, srand > #pragma warning(disable : 4996) > typedef struct point { int x; int y; }point; > v
#include #include > #pragma warning (disable : 4996) > typedef struct node { //노드 : 값 저장 단위 //노드 = 값(vaule) + 다음 노드 주소(next) int value;
#include #include > #pragma warning (disable : 4996) > typedef struct DNode { int value; //값 struct DNode* prev; //이전 주소 struct DNode* next; //다음 주소 > }DNode; > /...
✔️ 배열을 이용한 스택(1) >c #include #include > #pragma warning (disable : 4996) > #define MAX_SIZE 5 > typedef struct stack { int arr[MAX_SIZE]; int
✔️ 배열을 이용한 큐 >c #include #include > #pragma waring (disable : 4996) > typedef struct node { int value; struct node* next; }node; > node* head = NULL; node* tail = NULL; > int dequeue(); void...
#include > #pragma warning (disable : 4996) > //구구단(2단) 재귀함수로 구현 void multitable(int num) { if (num == 0) { printf("함수종료\n");
배열을 complete binary tree로 변환 >#include #include > #pragma warning (disable : 4996) > #define ARR_SIZE 9 typedef struct treeNode { int value; struct treeNode* left; struct treeNode* right;...
BST c >#include #include > #pragma warning (disable : 4996) > typedef struct tree { int value; struct tree* left; struct tree* right; }tree; > tree* insertNodeTree(tree* t, int data); tr...
힙 구성c >c #include #include > #pragma warning (disable : 4996) > #define ARR_SIZE 10 > void shiftDown(int* arr, int parentIdx, int size); > //shiftDown : 부모 노드가 자식 노드의 값을 구해 비교 void shiftDown(int* arr...
#include #include #include //strlen > #pragma wanring (disable : 4996) > //연결리스트를 이용한 해시 구현 > typedef struct node { int value; //값 struct node* next; //다음 노드의 주소를 저장 }node; > typedef struct...