integer pointer inside function

Hi I need to do the following in C but I have no idea what I am doing. The following is my problem.

Declare a function that accepts an argument which is a pointer to an integer quantity and returns a character.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  #include <stdio.h>
#include <stdlib.h>

char myfunction(int *a);

int main(){
int *n;
char myfunction(n);	
printf("The charater is %c",n);
	
}
char myfunction(int *a)
{
	char b = 'C';
	a = &b;
	return a;
}



I keep getting a strange icon that looks like this [P]
I know this is a C++ forum, but could someone help me on this here?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

char myfunction(int *a);

int main(){
    int *n;
    char ch = myfunction(n);
    printf("The charater is %c", ch);
	
}
char myfunction(int *)
{
     return 'C';
}
Topic archived. No new replies allowed.