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
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What is the purpose of sprintf() function?
Why we use conio h in c?
What are pointers? Why are they used?
Write a simple code fragment that will check if a number is positive or negative.
What is the auto keyword good for?
What is #ifdef ? What is its application?
What are the different types of control structures?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is calloc malloc realloc in c?
What is pointer and structure in c?
What is the difference between printf and scanf in c?
Why is c called "mother" language?
Describe explain how arrays can be passed to a user defined function