void main()
{int a[5],i,b=16;
for(i=0;i<5;i++)
a[i]=2*i;
f(a,5,b);
for(i=0;i<5;i++)
printf("\n %d",a[i]);
printf("\n %d",b);
}
f(int *x,int n,int y)
{
int i;
for(i=0;i<n;i++)
*(x+i)+=2;
y=y+2;
}wat r the errors in the prg.and improvise the prg to get o/p.?
Answer Posted / masakali
2
4
6
8
10
16
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Is it better to use malloc() or calloc()?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is typedef struct in c?
why programs in c are running with out #include
If fflush wont work, what can I use to flush input?
What are the 5 data types?
given post order,in order construct the corresponding binary tree
What are types of functions?
Write a program to generate random numbers in c?
application attempts to perform an operation?
What is size of union in c?
What is the sizeof () operator?
Write a program on swapping (100, 50)
Tell me what is the purpose of 'register' keyword in c language?
What are the types of bitwise operator?