在这里插入代码片
#include <stdio.h>
void help()
{
printf("\t-t Ping 指定的主机,直到停止。\r\n");
printf("\t-a 将地址解析为主机名。\r\n");
}
int main(int argc, char *args[])
{
char *str[] =
{
"C",
"C++",
"ASM",
"PHP",
"JAVA"
};
char str1[][10] =
{
"C",
"C++",
"ASM",
"PHP",
"JAVA"
};
int i = 0;
char arr[10];
char *s = str[0];
str[0] = str[1];
str[1] = s;
for ( ; i < 5; i ++ )
{
printf("%08x\r\n", str[i]);
}
for ( i = 0; i < 5; i ++ )
{
printf("%08x\r\n", str1[i]);
}
for ( i = 0; i < 5; i ++ )
{
printf("%s\r\n", str[i]);
}
for ( i = 0; i < 5; i ++ )
{
printf("%s\r\n", str1[i]);
}
/*
puts((char*)0x004158a0);
puts((char*)0x004158a4);
puts((char*)0x004158a8);
puts((char*)0x004158ac);
puts((char*)0x004158b0);
*/
/*
int i = 0;
printf("argc = %d \r\n", argc);
if ( argc < 2 )
{
printf("Usage: %s --help\r\n", args[0]);
help();
return -1;
}
// args[0] 保存的是程序的名称
for ( ; i < argc; i ++ )
{
puts(args[i]);
}*/
return 0;
}
来源:CSDN
作者:hahahafree
链接:https://blog.csdn.net/weixin_43731793/article/details/103642138