C program to print the marks using two dimensional array.

 #include <stdio.h>


int main()
{

    int marks[2][4] = {{343 , 56 , 89 , 45},
                       {3 , 2 , 7 , 5}};

    for (int i = 0; i < 2; i++)
    {
        for (int j = 0; j < 4; j++)
        {
            /* code */

            // printf("the value of %d, %d element of the array is %d\n", i, j, marks[i][j]);
            printf("%d\n", marks[i][j]);
        }
        printf("\n");
    }

    return 0;
}

OUTPUT:
343 56 89 45 3 2 7 5

Comments

Post a Comment

Popular posts from this blog

C Program using continue statement

C program of WHILE Loop

NULL Pointer in C.

C Program using DO WHILE loop

C Program using SWITCH statement

New Animated Login or signup page made by HTML, CSS and JavaScript.

C Program to print multiplication table of any number.

C Language Travel Agency Manager Exercise.

STRUCTURE IN C PROGRAMMING.