일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- adjacentElementsProduct
- 백준
- flask
- 파이썬 포렌식
- almostIncreasingSequence
- Daily Commit
- 피보나치 수
- All Longest Strings
- 10953
- collections.deque
- markdown
- Numpy
- til
- Python
- Sequential Search
- codesignal
- 수 정렬하기
- recursion
- cpp
- centuryFromYear
- matrixElementsSum
- baekjun
- data_structure
- C++
- codesingal
- 2015 봄학기 알고리즘
- shapeArea
- 파이썬머신러닝완벽가이드
- Counting cells in a blob
- 2750
Archives
- Today
- Total
Introfor
[data_structure] Linked List 본문
#include <stdio.h>
#include <stdlib.h>
typedef struct node{
int data;
struct node* next;
} Node;
int main(){
Node* head = NULL;
head = (Node*)malloc(sizeof(Node));
head->data = 1;
head->next = NULL;
Node* q = (Node *)malloc(sizeof(Node));
q->data = 2;
q->next = NULL;
head->next = q;
q = (Node *)malloc(sizeof(Node));
q->data = 0;
q->next = head;
head = q;
Node *p = head;
while(p!=NULL){
printf("%d\n", p->data);
p = p->next;
}
return 0;
}
'Doing > C&C++' 카테고리의 다른 글
[Recursion] Counting Cells in a Blob (0) | 2020.07.30 |
---|---|
Recursion. 미로찾기 (0) | 2020.07.28 |
[Algorithm] sequential Search (0) | 2020.07.01 |
[C++] Reference (0) | 2020.06.29 |
[C++] Pair, Vector STL (0) | 2020.06.29 |
Comments