Im wondering if its possible in C programming language to declare a 2D matrix with the second index declared as variable. Without using argv[n] command line.
For example
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv){
int a;
scanf("%d", &a)
int matrix[][a]
SNIP...
I’m studying C for physics son i cannot try too many other things to try to resolve this.
New contributor
Andreas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2