ARGV [ARGC] ==? [英] argv[argc] ==?

查看:120
本文介绍了ARGV [ARGC] ==?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的教授和几个同学在争论是否的argv 是空终止与否。我的朋友写了一个小程序,它打印出来,但另一个孩子说,他可能是简单地读入空白的存储。有人能解决这个讨论呢?

My professor and a couple of students are arguing about whether argv is null terminated or not. My friend wrote a small program and it printed out null but another kid said that he is probably simply reading into blank memory. Can someone solve this discussion?

推荐答案

从标准:

5.1.2.2.1程序启动结果
  ...结果
     - ARGV [ARGC]应是一个空指针

5.1.2.2.1 Program startup
...
-- argv[argc] shall be a null pointer.

所以,是的;的argv是空终止

So, yes; argv is null terminated

这篇关于ARGV [ARGC] ==?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆