Answers for "pass pointer to a function c"

C
2

how to use a pointer as a parameter in c

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void add(int* a, int* b, int* c)
{
    *c = *a + *b;
}
int main()
{
	int a, b, c;
	a = 3;
	b = 5;
	add(&a, &b, &c);
	printf("%d", c);
}
Posted by: Guest on March-21-2020
-1

passing a pointer to a function

/**
* myFunction - a function that recieves an integer pointer
*/

void myFunction(int *param) {
   .
   .
   .
}
Posted by: Guest on August-04-2021

Code answers related to "pass pointer to a function c"

Code answers related to "C"

Browse Popular Code Answers by Language