별의 공부 블로그 🧑🏻‍💻

🗒️ 2017/04 (7)

728x90
  1. 2017.04.26 TOEIC Online Test

    http://www.toeic-online-test.com/ 토익 & 토플 관련 문제들을 온라인에서 풀 수 있는 사이트.

  2. 2017.04.26 Multiplication Tables (9X9, 18X18) in C

    9 X 9 Multiplication Table 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #include int main(void) { printf("Multiplication Table (9X9) \n"); for (int i = 0; i

  3. 2017.04.21 Checking whether an input element is a number or not with using DO macro. (Infinite Loop)

    (defun read-a-number () (do ((answer nil)) (nil) ; This is necessary to make Infinite Loop function. (format t "~&Please type a number: ") (setf answer (read)) (if (numberp answer) (return answer) (format t t "~&Sorry, ~S is not a number. Try again." answer)))) A Program which checks whether the input number is a number or not by using DO macro. If the input number is not a number, the program p..

  4. 2017.04.17 [C] 단순 연결 리스트(Singly Linked List)

    단순 연결 리스트(Singly Linked List) - 단순 연결 리스트는 노드들이 하나의 링크 필드를 가지며 이 링크 필드를 이용하여 모든 노드들이 연결되어 있음. - 마지막 노드의 링크 필드 값은 NULL. - 첫 번째 노드를 가리키는 포인터(헤드 포인터) 값만 알고 있으면 연결 리스트 안의 모든 노드에 접근이 가능함. -> 하나의 단순 연결 리스트는 첫 번째 노드를 가리키는 하나의 포인터만 있으면 충분함. - 헤드 포인터(head pointer) : 첫 번째 노드를 가리키는 포인터 코드 #include typedef int element; typedef struct ListNode { element data; struct ListNode *link; } ListNode; void error(cha..

  5. 2017.04.17 Numbers in Ascending/Descending Order with using Recrusion in C

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #include void recur_print(int n) { recur_print(10); } // 10 9 8 7 6 5 4 3 2 1 void recur_print(int n) { if (n > 0) { printf("%d ", n); recur_print(n-1); } } // 1 2 3 4 5 6 7 8 9 10 void recur_print(int n) { int a; if (n > 0) { recur_print(n-1); printf("%d ", n); } } cs As you can see, if you put the part for recursion before you put the pa..

  6. 2017.04.17 Sum of Numbers in Ascending/Descending Order with using Recursion in C

    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 32 33 #include int print_sum(int n); void main() { printf(" = %d", print_sum(10)); } // 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 int print_sum(int n) { if (n

  7. 2017.04.17 포인터 정리 (Arrangement of Single Pointer) in C

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include void main() { int a[2] = { 4, 9 }; int *p = a; printf("1 : %d, \n", *p); // 현재 위치의 값 : 4 printf("2 : %d, \n", (*p)++); // 현재 위치의 값 출력 후 1 증가 (값 증가) : 4 printf("3 : %d, \n", *p++); // 현재 위치의 값 출력 후 주소 1 증가 : 5 printf("4 : %d, \n", *p--); // 현재 위치의 값 출력 후 주소 1 감소 : 9 printf("5 : %d, \n", *(p++); // 현재 위치의 값 출력 후 주소 1 증가 : 5 printf("6 : %d, \n", *p..

728x90


📖 Contents 📖