Why this program has compilation error? How to fix it?
#include<iostream>
using namespace std;
int main()
{
char s[] = "hello";
display(s);
return 0;
}
void display(char *s)
{
cout<<s<<endl;
}
Answer:
display function is defined AFTER the call to it.