12 lines
403 B
C
12 lines
403 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
void main() {
|
|
printf("Ejemplo de uso de system():");
|
|
printf("\n\tListado del directorio actual y envio a un fichero:");
|
|
printf("%d", system("ls > ficherosalida.txt"));
|
|
printf("\n\tAbrimos con nano el fichero ...:");
|
|
printf("%d", system("nano ficherosalida.txt"));
|
|
printf("\n\tEste comando es erroneo: %d", system("msword"));
|
|
printf("\nFin del programa");
|
|
}
|