int ascVal(size_t i, const char* p)Write a program that will call this function through a pointer and verify that it works. You'll need an #include directive for the <cstring> header in your program to use the strlen() function.
{
// print the ASCII value of the char
if (!p || i > strlen(p))
return -1;
else
return p[i];
}