This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/getdcwd.c

16 lines
269 B
C

#include <stdio.h>
#include <stdlib.h>
#include <direct.h>
void main( void )
{
char *cwd;
cwd = _getdcwd( 3, NULL, 0 );
if( cwd != NULL ) {
printf( "The current directory on drive C is %s\n",
cwd );
free( cwd );
}
}