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

Can you please explain the difference between strcpy() and memcpy() function?

0 Answers  


#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3)); }

4 Answers   HCL,


#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.

8 Answers   IBM,


how to reverse string "Hello World" by using pointers only. Without any temp var

1 Answers  


Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]

2 Answers  






What is the mean of function?

0 Answers  


no consistent academics. how to answer the question

0 Answers  


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

0 Answers  


write a progam to compare the string using switch case?

1 Answers  


How do I get a null pointer in my programs?

0 Answers  


find out largest elemant of diagonalmatrix

0 Answers  


c program to manipulate x=1!+2!+3!+...+n! using recursion

1 Answers   TCS,


Categories