how write a addtion of two single dimensional array using
of pointer in c language?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / shubhankar
can anybody tell me how the 1st will get executed???????????
Is This Answer Correct ? | 0 Yes | 0 No |
Why do we need volatile in c?
main() { int i; printf("%d",i^i); }
Where static variables are stored in c?
What are pragmas and what are they good for?
What is the 'named constructor idiom'?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
Write a program for the following series: 1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms
dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?
What is #line used for?
WHAT IS C?
palindrome for strings and numbers----Can anybody do the prog?
6 Answers CTS, TCS, Vipro Lifescience Pvt,
wat are the two methods for swapping two numbers without using temp variable??