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 you please explain the difference between strcpy() and memcpy() function?
#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3)); }
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
how to reverse string "Hello World" by using pointers only. Without any temp var
Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]
What is the mean of function?
no consistent academics. how to answer the question
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
write a progam to compare the string using switch case?
How do I get a null pointer in my programs?
find out largest elemant of diagonalmatrix
c program to manipulate x=1!+2!+3!+...+n! using recursion