I need help with this problem. I have written the code. The function main() stores the message in an array. What I need to figure out is how to have the function restaurant accept the message as an argument(which is named menu) and display the message using pointer notation *(menu+i) and also again with the *menu notation.
Should I use this or something similar ? ptr[0] = ptr[10]
#include <stdio.h>
#include <string.h>
int restaurant(char*);
int main() {
char message[17] = { 'W', 'h', 'a', 't', 's', ' ', 'f', 'o', 'r',
' ', 'l', 'u', 'n', 'c', 'h', '?', '\0' };
int i, *mPtr;
restaurant(message);
return 0;
}
int restaurant(char* menu) {
return 0;
}