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

Post New Answer

More C Interview Questions

What is the purpose of void in c?

0 Answers  


Why are all header files not declared in every c program?

0 Answers  


What are linked lists in c?

0 Answers  


every function has return the value?

1 Answers  


what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??

5 Answers  






how to get the starting address of file stored in harddisk through 'C'program.

2 Answers   Siemens,


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?

4 Answers   L&T,


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

1 Answers   IBM,


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(); }

0 Answers   Microsoft,


What is string concatenation in c?

0 Answers  


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..

1 Answers  


What are all different types of pointers in c?

0 Answers  


Categories