write a program to create a sparse matrix using dynamic memory
allocation.
No Answer is Posted For this Question
Be the First to Post Answer
What is the purpose of void in c?
Why are all header files not declared in every c program?
What are linked lists in c?
every function has return the value?
what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??
how to get the starting address of file stored in harddisk through 'C'program.
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?
what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is string concatenation in c?
write a program in c to find out the sum of digits of a number.but here is a condition that compiler sums the value from left to right....not right to left..
What are all different types of pointers in c?