I wanted to pass the value of argv to a function but it is showing error so can any body hellp me my function
void init(void)
{
// TODO
int size = *dim;
int row;
int column;
int element = size * size - 1;
for (row = 0; row < size; row++ )
{
for(column = 0; column < size; column++)
{
printf("%d", element);
element++;
}
printf("\n");
}
}
And in main it is something like this
int *dim;
dim = atoi(argv[1]);
{}
. When posting code, select this code, and press the button. If any of the selected lines does not have 4 spaces in front, it'll add four spaces to each line, which in Stackexchange markdown is interpreted as code block. Clicking it while all lines have at least four leading spaces, it will remove four of them. – Blauelf Mar 24 '17 at 13:31