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 |
Can we declare a function inside a function in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
how do you redirect stdout value from a program to a file?
Tell us the use of fflush() function in c language?
What are 3 types of structures?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
we have to use realloc only after malloc or calloc ? or we can use initially with out depending on whether we are using malloc or calloc in our program ?
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
Why C language is a procedural language?
what is the similarities between. system call and library function?
Not all reserved words are written in lowercase. TRUE or FALSE?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures