how write a addtion of two single dimensional array using
of pointer in c language?

Answer Posted / danush

int a[10],int b[10];
int i,n;
scanf("%d";n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}similarly for b
for(i=0;i<n;i++)
{int result[i];
resul[i]=a[i]+b[i];
/*for addition of singe row or column matrix

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to print the character with maximum occurence and print that number of occurence too in a string given ?

2039


How do you write a program which produces its own source code as output?

611


What are the different types of constants?

644


What is wrong with this declaration?

615


How can I read data from data files with particular formats?

607






Where static variables are stored in memory in c?

527


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1269


How can I recover the file name given an open stream or file descriptor?

600


What's the total generic pointer type?

620


What are the c keywords?

754


What is the need of structure in c?

571


how is the examination pattern?

1600


Why c language?

652


Explain enumerated types in c language?

608


How is a macro different from a function?

660