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 |
What is the output of the below program and how it is? void main() { static int var=5; printf("%d",var--); if(var) main(); }
8 Answers MindFire, TCS, Tech Mahindra,
Does c have an equivalent to pascals with statement?
Write a program in c using only loops to print * * * * * *******
What is cohesion and coupling in c?
Is there a built-in function in C that can be used for sorting data?
1.find the second maximum in an array? 2.how do you create hash table in c? 3.what is hash collision
Explain the difference between exit() and _exit() function?
Explain what are the different file extensions involved when programming in c?
here is a link to download Let_Us_C_-_Yashwant_Kanetkar
What is use of #include in c?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
1 1 2 1 2 3 1 2 3 4 1 2 3 1 2 1 generate this output using for loop