What is the output of the following program?

a) What is the output of the following program?
#include<stdio.h>
void fun(int*, int*);
int main()
{
int i=5, j=2;
fun(&i, &j);
printf("%d, %d", i, j);
return 0;
}
void fun(int *i, int *j)
{
*i = *i**i;
*j = *j**j;
}
b) Write and explain the action of WHILE statement. Develop a program in ‘C’ language to
compute the average of every third integer number lying between 1 and 100. Include
appropriate documentation.
c) Write a function which receives two integer arrays and creates a third array by multiplying
corresponding elements (elements with same index) and returns it to main program.

Leave a Reply