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?
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- Index of single bit in long integer (in C) [duplic
- Equivalent of std::pair in C
From the Standard:
So, yes; argv is null terminated
According to the standard, "argv[argc] shall be a null pointer" (5.1.2.2.1).