saving . . . saved Assingment -14 has been deleted. Assingment -14 has been hidden .
Assingment -14
Title
Question
//Two-dimensional arrays in C
#include <stdio.h>
int main()
{
   int i,j;
   int num1[3][4],num2[3][4];
   printf("Enter the elements of 3X4 array num1\n");
   for(i=0; i<3; i++)
   for(j=0; j<4; j++)
   scanf("%d", &num1[i][j]);

   printf("Enter the elements of 3X4 array num2\n");
   for(i=0; i<3; i++)
   for(j=0; j<4; j++)
   scanf("%d", &num2[i][j]);

   printf("The subtraction of num1 and num2 is\n");
   for(i=0; i<3; i++)
    {
      for(j=0; j<4; j++)
      printf("%3d ", (num1[i][j] - num2[i][j]));
      printf("\n");
    }
   return 0;
}


Naveen VP


C-and-Cpp Working-With-2D-Arrays 04-05 min 10-20 sec 06-12-21, 10:19 p.m. naveenpalanisamy142002@gmail.com

Answers:

Assignments are only for self-assessment. If you have any specific question related to this tutorial please post here.
10-01-22, 3:47 p.m. hbammkanti


Log-in to answer to this question.