Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 가벼운갤럭시
- 스탠바이미2장점
- 스탠바이미2단점
- 스탠바이미2총평
- 닌텐도스위치2출시
- 스탠바이미2실사용
- kotlin
- ethereum
- 닌텐도스위치2게임
- 다윈
- Android
- 닌텐도2
- C
- error
- 스트리밍
- Exception
- 컴파일
- convert
- Realm
- 스탠바이미2사용후기
- 스탠바이미2리뷰
- Gradle
- 스탠바이미2후기
- 안드로이드
- 스탠바이미2세대
- firebase
- 스탠바이미2출시
- log
- Glide
- test
Archives
- Today
- Total
날마다 새롭게 또 날마다 새롭게
문자열 입력을 받아 정렬하는 프로그램 (포인터 배열) 본문
#include <stdio.h>
#include <string.h>
#define MAXLINES 5000
char *lineptr[MAXLINES];
int readlines(char *lineptr[], int nlines);
void writelines(char *lineptr[], int nlines);
void qsort(char *lineptr[], int left, int right);
main()
{
int nlines;
if((nlines = readlines(lineptr, MAXLINES))>=0) {
qsort(lineptr,0,nlines-1);
writelines(lineptr,nlines);
return 0;
} else {
printf("error : input too big to sort \n");
return 1;
}
}
#define MAXLEN 1000
int getline(char *,int);
char *alloc(int);