I'm unsure if this is correct, I included an example of what I mean:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char** argv){
int duzina;
duzina = strlen(argv[1]);
char novi[duzina+1];
strcpy(novi, argv[1]);
printf("%s\n", novi);
return 0;
}
I compiled it and ran it, and it executed like intended, but I'm unsure if this is proper use of static allocation.