how write a addtion of two single dimensional array using
of pointer in c language?
Answer Posted / *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 |
Post New Answer View All Answers
What does %c mean in c?
What is an endless loop?
Why main function is special give two reasons?
Explain what is the benefit of using enum to declare a constant?
Explain the binary height balanced tree?
Why c is known as a mother language?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What is the easiest sorting method to use?
What will be your course of action for a push operation?
Are there any problems with performing mathematical operations on different variable types?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
what is the significance of static storage class specifier?
What is formal argument?
What is the difference between abs() and fabs() functions?