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


Please Help Members By Posting Answers For Below Questions

What are the primitive data types in c?

580


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1520


Why main is not a keyword in c?

653


Define circular linked list.

575


Why & is used in scanf in c?

629






Why static variable is used in c?

562


What is structure in c language?

626


Can include files be nested? How many levels deep can include files be nested?

661


What is the difference between procedural and functional programming?

523


What is the difference between far and near ?

691


Describe the steps to insert data into a singly linked list.

627


What does s c mean in text?

621


Is it possible to have a function as a parameter in another function?

604


If fflush wont work, what can I use to flush input?

622


How does placing some code lines between the comment symbol help in debugging the code?

550