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

What is c language in simple words?

0 Answers  


What is the use of #include in c?

0 Answers  


implement OR gate without using any bitwise operator.

1 Answers   Alcatel, Wipro,


#include<stdio.h> main() { int a=1; int b=0; b=++a + ++a; printf("%d %d",a,b); }

7 Answers   Infosys,


What are the 5 organizational structures?

0 Answers  






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

4 Answers  


write a program to print data of 5 five students with structures?

0 Answers  


Why do some versions of toupper act strangely if given an upper-case letter?

0 Answers  


What does the c preprocessor do?

0 Answers  


Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage

7 Answers   Accenture,


what is data structure?

5 Answers   CBSE,


What is the purpose of void pointer?

0 Answers  


Categories