#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> int main() { char command[100]; char ip_address[] = "192.168.1.13"; char netmask[] = "255.255.255.0"; sprintf(command, "ifconfig eth0 %s netmask %s", ip_address, netmask); system(command); return 0; } [2024-09-05 14:57:11 | AI写代码神器 | 205点数解答]