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 |
Write a code to determine the total number of stops an elevator would take to serve N number of people.
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
what is differnence b/w macro & functions
Which of the following about automatic variables within a function is correct ? a.its type must be declared before using the variable b.they are local c.they are not initialised to zero d.they are global.
write a 'c' program to sum the number of integer values
What is the output for the following program #include<stdio.h> main() { char a[5][5],flag; a[0][0]='A'; flag=((a==*a)&&(*a==a[0])); printf("%d\n",flag); }
What type is sizeof?
difference between spiral and waterfall model
Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
what is the use of fflush() function?
wat s the meaning of (int *)p +4;
What is void pointers in c?