You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
281 B
C
19 lines
281 B
C
5 years ago
|
/*
|
||
|
* C Program to Illustrate Pass by Reference
|
||
|
*/
|
||
|
#include <stdio.h>
|
||
|
|
||
|
void cube( int *x);
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int num = 10;
|
||
|
cube(&num);
|
||
|
printf("the cube of the given number is %d", num);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
void cube(int *x)
|
||
|
{
|
||
|
*x = (*x) * (*x) * (*x);
|
||
|
}
|