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
Why c is called object oriented language?
What are pointers? What are stacks and queues?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is the use of gets and puts?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
write a proram to reverse the string using switch case?
What is wild pointer in c with example?
Is calloc better than malloc?
What is boolean in c?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
Why can arithmetic operations not be performed on void pointers?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What do you mean by invalid pointer arithmetic?