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

Answers were Sorted based on User's Feedback



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

Answer / *c

int a[10];
int b [10];
int c [10];
int i;

for (i=0;i<foo;i++) {
*(c+i) = *(a+i) + *(b+i);

}

Is This Answer Correct ?    5 Yes 2 No

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

Answer / 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

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

Answer / shubhankar

can anybody tell me how the 1st will get executed???????????

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Why do we need volatile in c?

0 Answers  


main() { int i; printf("%d",i^i); }

1 Answers  


Where static variables are stored in c?

0 Answers  


What are pragmas and what are they good for?

0 Answers  


What is the 'named constructor idiom'?

0 Answers  


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

0 Answers  


Write a program for the following series: 1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms

5 Answers   Convex Digital,


dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?

4 Answers  


What is #line used for?

0 Answers  


WHAT IS C?

6 Answers  


palindrome for strings and numbers----Can anybody do the prog?

6 Answers   CTS, TCS, Vipro Lifescience Pvt,


wat are the two methods for swapping two numbers without using temp variable??

2 Answers  


Categories