1. Function main must be of type int and return a return-value.
2. A double pointer is not needed, ClrR wants the address of the string. Since a is a pointer, you can pass a.
3. It's easier to treat a string as an array of chars in situations like these.
4. You need to pass the last character back to main if you want main to have it.
Code:
#include <stdio.h>
void ClrR (char*, char *);
int main(void)
{
char* a = "1234";
char ch;
ClrR(a, &ch);
printf ("%s %c\n", a, ch);
return 0;
}
void ClrR(char* str, char *ch)
{
int pos;
pos = strlen (str) - 1;
*ch = str [pos];
str [pos] = '\0';
}