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

Function main

Chapter 7/02_array_input.c:3–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <stdio.h>
2
3int main(){
4 int marks[5];
5
6 printf("Enter marks of 5 students\n");
7
8 // scanf("%d", &marks[0]);
9 // scanf("%d", &marks[1]);
10 // scanf("%d", &marks[2]);
11 // scanf("%d", &marks[3]);
12 // scanf("%d", &marks[4]);
13 for (int i = 0; i < 5; i++)
14 {
15 scanf("%d", &marks[i]);
16 }
17
18 for (int i = 0; i < 5; i++)
19 {
20 printf("The value of marks at index %d is %d\n", i, marks[i]);
21 }
22
23
24 return 0;
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected