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 |
differentiate built-in functions and user – defined functions.
what is the syallabus of computer science students in group- 1?
Explain the bubble sort algorithm.
What is the difference b/w Structure & Union?
Why is c called a structured programming language?
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?
Why does notstrcat(string, "!");Work?
What is pointers in c?
Can a program have two main functions?
What are the benefits of organizational structure?
#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
Add Two Numbers Without Using the Addition Operator