MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-C-Programming-Course / main

Function main

Chapter 10/01_file.c:3–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <stdio.h>
2
3int main()
4{
5 FILE *ptr;
6 ptr = fopen("harry.txt", "r");
7 int num;
8 fscanf(ptr, "%d", &num);
9 printf("The value of num is %d \n", num);
10
11 fscanf(ptr, "%d", &num);
12 printf("The value of num is %d \n", num);
13
14 fclose(ptr);
15
16 return 0;
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected