Ch Standard Demos
ISO C90 Standard
Wide characters
ISO C99 Standard
C++ features
Complex IEEE floating-point arithmetic
Assumed-shape arrays
Nested functions
Interactive C statement execution
Interactive command shell
Shell Programming
Safe Ch
Ch applets
String Type
Adjustable array bounds
Auto array bound checking
Socket/Winsock
POSIX
Unix utilities for Windows
Windows
GTK+
X/Motif
OpenGL
Toolkits Demos
CGI
ODBC
ChExcel
Ch Professional Demos
Computational array
Plotting
Numerical analysis
C LAPACK functions
/* 
   This program prints names of all files in the current directory.
   The program is portable in Ch and can run in Unix/Linux/Windows.
*/
#include <stdio.h>
#include <dirent.h>

int main() {
    DIR *dirp;
    struct dirent *direntp;

    dirp = opendir( "." );
    while ( (direntp = readdir( dirp )) != NULL )
    {
        printf( "%s\n", direntp->d_name );
    }
    closedir( dirp );
    return (0);
}