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
What is the purpose of type declarations?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Differentiate fundamental data types and derived data types in C.
What is the use of function overloading in C?
What are structure members?
Why double pointer is used in c?
If the size of int data type is two bytes, what is the range of signed int data type?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
What is a substring in c?
Are bit fields portable?
what is uses of .net
Explain what are multibyte characters?
What is the difference between fread buffer() and fwrite buffer()?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)