#include <stdio.h>
#include <conio.h>
#include <string.h>
#define MAXHS 50
#define MAXLEN 30
int main()
{
int i, j, count = 0; char ds[MAXHS][MAXLEN];
char *ptr[MAXHS], *tmp;
while (count < MAXHS)
{
printf("/n Hoc sinh thu : %d ", count + 1);
gets_s(ds[count]);
if (strlen(ds[count]) == 0) break;
ptr[count] = ds+count;
++count;
}
for (i = 0; i<count - 1; i++)
for (j = i + 1; j < count; j++)
if (strcmp(ptr[i], ptr[j])>0)
{
tmp = ptr[i];
ptr[i] = ptr[j];
ptr[j] = tmp;
}
for (i = 0; i<count; i++)
printf("\n %d : %s", i + 1, ptr[i]);
getch();
}
Mọi người cho mình hỏi lỗi ở đâu?

cho nó đúng chuẩn C nhé
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?