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

differentiate built-in functions and user – defined functions.

0 Answers  


what is the syallabus of computer science students in group- 1?

0 Answers  


Explain the bubble sort algorithm.

0 Answers  


What is the difference b/w Structure & Union?

3 Answers  


Why is c called a structured programming language?

0 Answers  






What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

0 Answers  


Why does notstrcat(string, "!");Work?

0 Answers  


What is pointers in c?

0 Answers  


Can a program have two main functions?

0 Answers  


What are the benefits of organizational structure?

0 Answers  


#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300,200,100

1 Answers  


Add Two Numbers Without Using the Addition Operator

0 Answers  


Categories