当前位置:网站首页>C语言main函数传递参数
C语言main函数传递参数
2022-07-27 23:01:00 【zhuohui307317684】
如下:
void main(int argc, char **argv)
{
for (int i=1; i<argc; i++)
{
printf("%s ", argv[i]);
}
printf("\n");
if (argc - 1 != 2) // 如果传进来的参数不是2个,则赋值之
{
argc = 2 + 1;
argv[1] = "file1.txt";
argv[2] = "file2.txt";
}
printf("********************************\n");
printf("=====end=====\n");
system("timeout /t 60");
}边栏推荐
猜你喜欢

Tear the source code of gateway by hand, and tear the source code of workflow and load balancing today

Redis sentinel mode

Database daily question --- day 22: last login

Resolved Unicode decodeerror: 'UTF-8' codec can't decode byte 0xa1 in position 0: invalid start byte

DEMO:测试接口短时间内接收重复数据创建单据
![Thesis appreciation [iclr18] a neural language model combining syntax and vocabulary learning](/img/1c/5b9726b16f67dfc2016a0c2035baae.png)
Thesis appreciation [iclr18] a neural language model combining syntax and vocabulary learning

One year anniversary of creation, Chongba young Lang

110. In depth introduction to sap ui5 fileuploader control - why do you need a hidden iframe

Recommend a Hongmeng instant messaging software "fruit chat", which is a bit awesome!!

The most detailed summary of common English terms in the chip industry (quick grasp of graphics and text)
随机推荐
I/O设备的基本概念及分类
推荐系统-指标:ctr、cvr
【STM32】看门狗模块
Brief analysis of advantages, disadvantages and development of SAP modules
Array related knowledge
uni-app进阶之样式框架/生产环境
Process and process scheduling
Ford SUV "Mustang" officially went offline, safe and comfortable
网络安全漏洞分析与漏洞复现
Learning note 12: Eratosthenes screening method to find prime numbers (within 100) and magic square matrix
Safety detection risk
Redis-哨兵模式
c# 反射之Type使用
[BuildRelease Management]Parabuild
Redis缓存穿透击穿和雪崩
Database daily question --- day 22: last login
分支和循环语句题目练习
Starfish Os打造的元宇宙生态,跟MetaBell的合作只是开始
共创文旅新篇章|新起典与国华文旅签订战略合作协议
BigDecimal常用API