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
What are the advantages and disadvantages of c language?
Do pointers take up memory?
Explain what’s a signal? Explain what do I use signals for?
Can we change the value of constant variable in c?
How to declare pointer variables?
What is assignment operator?
What is data types?
Write a program to swap two numbers without using a temporary variable?
Do character constants represent numerical values?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Are there namespaces in c?
What is scope rule of function in c?
Why is c called c not d or e?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)