i have written small c language code to execute "dir" command which displays directories and files in the current directory, using system() function in c. But my code doesn't work. please help me.
# include <string.h>
# include <stdio.h>
# include <stdlib.h>
void main()
{
clrscr();
system("dir");
getch();
}