일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- 자바
- backend
- 프로그래밍
- java정리
- SNS
- 코딩
- 개발자
- Reflex
- 프로그램
- 주가예측
- 코딩테스트
- 프로그래머스
- 개발
- 코테
- 빅데이터
- 개인프로젝트
- 모의 주식
- 코스닥
- 풀스택프레임워크
- 자바정리
- 코딩독학
- Project
- 이웃한 칸
- 자바독학
- Python
- 백준
- C++
- 사물인터넷
- frontend
- java
- Today
- Total
목록C Programming (104)
Creative Code
※main.c파일 #include #include "queue.h" int main(void) { Queue s1, s2; initQueue(&s1); initQueue(&s2); push(&s1,100); push(&s1,200); push(&s1,300); printf("s1 1st pop() : %d\n",pop(&s1)); printf("s1 2nd pop() : %d\n",pop(&s1)); printf("s1 3rd pop() : %d\n",pop(&s1)); pop(&s1); push(&s2,900); push(&s2,800); printf("s2 1st pop() : %d\n",pop(&s2)); push(&s2,700); printf("s2 2nd pop() : %d\n",pop(&s2)..
※main.c파일 #include #include "queue.h" int main(void) { push(100); push(200); printf("1st pop() : %d\n",pop()); push(300); printf("2nd pop() : %d\n",pop()); printf("3rd pop() : %d\n",pop()); } ※queue.h파일 #ifndef QUEUE_H #define QUEUE_H void push(int data); int pop(void); #endif ※queue.c파일 static int queue[100]; static int rear; static int front; void push(int data) { queue[rear] = data; ++rear; }..
※main.c파일 #include #include "stack.h" int main(void) { Stack s1, s2; initStack(&s1,10,sizeof(int)); initStack(&s2,100,sizeof(double)); int i; i = 100;push(&s1,&i); i = 200;push(&s1,&i); i = 300; push(&s1,&i); int re1; pop(&s1,&re1);printf("s1 1st pop() : %d\n", re1); pop(&s1,&re1);printf("s1 2nd pop() : %d\n", re1); pop(&s1,&re1);printf("s1 3rd pop() : %d\n", re1); double d; d = 1.1; push(&s2,&d..
※main.c파일 #include #include "stack.h" int main(void) { Stack s1, s2; initStack(&s1,10); initStack(&s2,100); push(&s1,100); //구조체 자료는 인자를 전달할 때 오버헤드를 줄이기 위해 포인터를 쓴다. push(&s1,200); push(&s1,300); printf("s1 1st pop() : %d\n",pop(&s1)); printf("s1 2nd pop() : %d\n",pop(&s1)); printf("s1 3rd pop() : %d\n",pop(&s1)); push(&s2,900); push(&s2,800); push(&s2,700); printf("s2 1st pop() : %d\n",pop(&s2))..
#include #include int main(void) { int size; scanf("%d",&size); int *pArr = malloc(sizeof(int) *size); if (pArr == NULL){ fprintf(stderr,"can't malloc()\n"); // 제대로 공간이 할당되지 않았을 때 exit(1); } for (int i = 0; i
※main.c파일 #include #include "stack.h" int main(void) { Stack s1, s2; //Stack stacks[10]; s1.tos = 0; s2.tos = 0; push(&s1,100); //구조체 자료는 인자를 전달할 때 오버헤드를 줄이기 위해 포인터를 쓴다. push(&s1,200); push(&s1,300); printf("s1 1st pop() : %d\n",pop(&s1)); printf("s1 2nd pop() : %d\n",pop(&s1)); printf("s1 3rd pop() : %d\n",pop(&s1)); pop(&s1); push(&s2,900); push(&s2,800); push(&s2,700); printf("s2 1st pop() : ..