1. Programs written in C are given below. Find out the output for each of the programs.
Program 1:
#include
int modify(int a, int b, int c);
void main()
{
int y;
y = modify(6,7,8);
printf(“%d”,y);
}
int modify(int a, int b, int c)
{
return (a * b /c);
}
Program 2:
#include
void change(int b[],int n);
int i;
void main()
{
int a[] ={2,4,6,8,10};
int i;
change(a,5);
for(i=0;i<5;i++)
printf(“%d”,a[i]);
}
void change(int b[],int n)
{
for(i=0;ib[i] +=5;
}
2. With the help of suitable examples describe the following terms:
(i) Variable;
(ii) Array;
(iii) Pointer.