argc is the counter of how many arguments that are passed in to the program (it is 1 with no additional arguments passed because it passes it's own path by default)

argc is allowed to be zero. Further, even if argc is greater than zero, argv[0] is not required to be more than an empty string. If it's not an empty string, argv[0] represents the "program name". "Program name" isn't otherwise defined by the standard, but two common interpretations are the executable file name (eg. "foo.exe"), and the full executable file path ("C:\my programs\foo.exe"). So beware making assumptions about argv[0] .

argv is the "vector" that holds all the arguments passed.

Also note that it's a NULL terminated array, so argv[argc] is guaranteed to be a null pointer. This can simplify traversing the arguments by removing the need for an index:

A minor bit of trivia that comes in handy occasionally, such as when tokenizing an argument with strtok(), is that the arguments are modifiable arrays. Provided you're careful about buffer overflow, you can write to argv[i] for any i in the range of [0, argc). Obviously the null pointer at argv[argc] doesn't constitute an array, modifiable or not. ;)

In Windows to pass arguments you need to run the command line and type "start FILEPATH arg1 arg2". Or you can use "call" if you want to keep it in the existing window.

Most IDEs will also offer a debug option for passing command line arguments.

#include <conio.h>
...
getch();

I'd strongly recommend getting out of the habit of using conio.h for anything. Most of the time it's unnecessary, and it destroys portability. While you can do anything you want with your own programs, it's best to strive for maximally portable code when helping people here (unless they explicitly ask for something non-portable). Your code can easily be made portable by switching to getchar() and simply requiring Enter and instead of any key:

The only issue with this that getch() doesn't typically have would be dealing with extraneous characters. If there's already a newline sitting in the stream, the pause won't work. But if you follow best practice for input, that shouldn't happen.

If you want the argument to be converted to an integer then you can use the atoi() function.

Please forget that atoi() exists. It's second only to gets() in bugginess because unless you pre-validate the string to ensure that it's a valid integer, you'll invoke undefined behavior. There's also the problem of returning 0 on a failed conversion without the requirement that errno be set. This means you have no way of telling if a return value of 0 is an error or a successful conversion of "0".

strtol() is a much better alternative because you have more robust error handling opportunities.

If you use a compiler that supports conio.h, it can often be the simplest solution. For example, reading a key press with getch() or kbhit() is simpler than implementing the same behavior with Win32 or POSIX libraries. Since those operations are inherently non-portable, it's not as bad as the more common uses of conio.h:

Reading a character without echo and replacing it with a mask character is something that cannot be done portably, so some non-portable solution is necessary. Provided conio.h is available, getch() is the simplest solution to the best of my knowledge.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...