Variable Substitution in C
问题 I want to open a file. Easy enough. Use fopen(). However, what file to open depends on the user input. I am somewhat proficient in Korn Shell scripting and this is easily done using variable substitution: $(var). I am unable to figure out the correct format in C. Could someone please give me some insight? My code - #include <stdlib.h> #include <stdio.h> char statsA[100]; char fileA[50]; int main (void) { printf("Enter file to open\n"); gets(fileA); FILE *statsA; statsA = fopen("c:/Users/SeanA