C语言访问一个链接

时间:2023-03-09 16:03:28
C语言访问一个链接

示例代码1:

# include <Windows.h>
int main(){ system("start http://""www.baidu.com"); return 0;
}

示例代码:

# include <stdio.h>
# include <string.h>
# include<Windows.h> int main(){ char a[20] = "start http://";
char b[20] = "www.baidu.com"; //指定一个长度够就行不指定程序会死 strcat(a,b); //合并字符串
//printf("%s",a);
system(a); return 0;
}
执行结果如下图:

C语言访问一个链接