Petit programme
Fermé
boby
-
25 juil. 2006 à 17:00
mamiemando Messages postés 32301 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 27 mars 2023 - 26 juil. 2006 à 13:52
mamiemando Messages postés 32301 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 27 mars 2023 - 26 juil. 2006 à 13:52
A voir également:
- Petit programme
- Ce programme est écrit en python. il construit un mot secret dans une variable mais il ne l'affiche pas. modifiez-le pour qu'il affiche le mot secret. exécutez-le. quel est ce mot secret ? ✓ - Forum Python
- Petit colis distribution - Forum Internet / Réseaux sociaux
- Petit 1 comme ² ✓ - Forum Windows
- Frequence programme national ✓ - Forum Messagerie
- Programme demarrage windows 10 - Guide
1 réponse
mamiemando
Messages postés
32301
Date d'inscription
jeudi 12 mai 2005
Statut
Modérateur
Dernière intervention
27 mars 2023
7 576
26 juil. 2006 à 13:52
26 juil. 2006 à 13:52
Tu veux le faire en batch ou en C ?
En C :
Bonne chance
En C :
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc,char **argv){
char *hostname;
char * args[4];
if(argc!=2){
printf("usage : %s hostname\n",argv[0]);
return 1;
}
hostname = argv[1];
args[0] = "";
args[1] = hostname;
args[2] = "-c2"; // Si tu utilises windows mets args[2] = ""
args[3] = NULL;
execvp("ping",args);
return 0;
}
Bonne chance