Write a C program to perform the following tasks In main Inp
Write a C program to perform the following tasks: In main: Input an integer and call a function to double it using call by-value In function: Calculate and return double of integer argument
Solution
#include <stdio.h>
int function(int);
int main()
{
int a,b;
printf(\"Enter Integer Number : \");
scanf(\"%d\",&a);
b = function(a);
printf(\"\ Double of the Integer Number is %d \",b);
return 0;
}
int function (int x)
{
return x*x;
}
