C Programming - Command Line Arguments - Discussion

Discussion Forum : Command Line Arguments - Find Output of Program (Q.No. 11)
11.
What will be the output of the program in Turbo C?
#include<stdio.h>

int main(int argc, char *argv, char *env[])
{
    int i;
    for(i=1; i<argc; i++)
        printf("%s\n", env[i]);
    return 0;
}
List of all environment variables
List of all command-line arguments
count of command-line arguments
Error: cannot have more than two arguments in main()
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
15 comments Page 2 of 2.

Lona said:   5 years ago
@Sona Deepak has explained it clearly.

Janu said:   1 decade ago
What is environment variables?

Sona said:   6 years ago
Environment variables means?

Jhethalal said:   5 years ago
Environment variables means?

Meenu said:   1 decade ago
Environment variable means?


Post your comments here:

Your comments will be displayed after verification.