Create a Sparse Matrix in C.
#include<stdio.h> #include<conio.h> #define MAX1 3 #define MAX2 3 struct sparse { int *sp; int row; }; void initsparse(struct sparse *); void ctarray(struct sparse *); void display(struct sparse); void main() { struct sparse s1,s2; int c; clrscr(); initsparse(&s1); initsparse(&s2); printf("\n\t\tCreation of the MATRIX"); printf("\n"); ctarray(&s1); printf("\n\t\tThe contents of the matrix"); display(s1); getch(); } void initsparse(struct sparse *s1) { s1->sp=NULL; } void ctarray(struct sparse *s1) { int n,i; s1->sp=(int *)malloc(MAX1*MAX2*sizeof(int)); for(i=0;i<MAX1*MAX2;i++) { printf("Enter element %d:",i); scanf("%d",&n); *(s1->sp+i)=n; } } void display(struct sparse s1) { int i; for(i=0;i<MAX1*MAX2;i++) { if(i%MAX2==0) printf("\n"); printf("%d\t",*(s1.sp+i)); } }
Write a C- Program To Determine If The Given String Is A Palindrome Or Not.
Write a C program to calculate the following sum:
Sum = 1-x^2/2!+x^4/4!-x^6/6!+x^8/8!-x^10/10!
Discuss about Staffing
Write a C program to print the fibonacci series.
Draw the ER diagram of a hospital and explain.
Why Required of ISO 9001:2000 standard?