System Command
eharetea

The system command in C allows programmers to communicate with the computer's operating system.

Use the system command in C.

Date Created:Tuesday February 27th, 2007 10:54 PM
Date Modified:Saturday August 02nd, 2008 01:53 PM


#include <stdio.h>
#include <stdlib.h>


int main()
{
        char name[1024];
        char command[] = "echo ";

        printf("Enter a name:\n");
        scanf("%s", &name);

        strncat(commandname, (strlen(command) + strlen(name)) );
        system(command);

        return 0;
}




Downloads:
Download: system.c 308 B

Please login or Click Here to register for downloads
Creative Commons License
System Command by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com