Answer Posted / it career point
//program to 3-tuple representation
#include<stdio.>
#include<conio.h>
void main()
{
int a[5][5],row,columns,i,j;
printf(Ënter the order of the matrix.(5*5)");
scanf("%d%d",&row,&columns);
printf("Enter the element of the matrix\n");
for(i=0;i<row;i++)
for(j=0;j<columns;j++)
{
scanf("%d", &a[i][j]);
}
printf("3-tuple representation");
for(i=0;i<row;i++)
for(j=0;j<column;j++)
{
if(a[i][j]!=0)
{
printf("%d %d %d", (i+1),(j+1),a[i][j]);
}
}
getch();
}
| Is This Answer Correct ? | 41 Yes | 42 No |
Post New Answer View All Answers
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Write a program on swapping (100, 50)
Write a program to reverse a string.
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
Add Two Numbers Without Using the Addition Operator
Explain what is wrong with this program statement? Void = 10;
how can f be used for both float and double arguments in printf? Are not they different types?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What is mean by data types in c?
How are strings stored in c?
Do pointers need to be initialized?
What is the difference between exit() and _exit() function?
When should the const modifier be used?
What are header files why are they important?
What is realloc in c?