Question: 1.What is wrong with the following function and why? int *setup(int n){ int a[n]; for(int i=0; i
1.What is wrong with the following function and why?
int *setup(int n){
int a[n];
for(int i=0; i a[i]=i+1; return a; } 2. Given the following main function of a program named mylist, if a user types the command line ./mylist 32 64 int main(int argc, char **argv){ int n=atoi(argv[1]); int m=atoi(argv[2]); int n=atoi(argv[3]); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
