What does inptr and outptr mean | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does inptr and outptr mean

Does anyone know what inptr and outptr mean? I know it's short for in and out pointer, but I just can't seem to grasp the purpose of it? Also if you can tell me why FILE is in there too id appropriate it. Thank you! char *infile = argv[1]; char *outfile = argv[2]; // open input file FILE *inptr = fopen(infile, "r"); if (inptr == NULL) { printf("Could not open %s.\n", infile); return 2; } // open output file FILE *outptr = fopen(outfile, "w"); if (outptr == NULL) { fclose(inptr); printf("Could not create %s.\n", outfile); return 3; }

22nd Sep 2019, 11:57 PM
David
David - avatar
0 Answers