C-Language/Recursion 썸네일형 리스트형 Recursion examples in C language C 언어에서 함수의 재귀호출(Self-Invocation) 예 C 언어로 구현한 링크드 리스트에 저장된 각 노드의 값을 합산할 때 재귀호출을 이용하는 예#include struct Node { int num; struct Node *prevNode; struct Node *nextNode; } ; int recursive(struct Node *); int main() { struct Node root = { 0,NULL,NULL }; struct Node node1 = { 1, &root, NULL }; root.nextNode = &node1; struct Node node2 = { 2, &node1, NULL }; node1.nextNode = &node2; struct Node node3 = { .. 더보기 이전 1 다음