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 is 'bus error'?
Why dont c comments nest?
What is console in c language?
Differentiate between Macro and ordinary definition.
Explain union. What are its advantages?
Do pointers store the address of value or the actual value of a variable?
In which layer of the network datastructure format change is done
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is a null pointer in c?
What do you mean by a local block?
Why is it important to memset a variable, immediately after allocating memory to it ?
Which header file is essential for using strcmp function?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
What is a pointer and how it is initialized?
how logic is used