#include int* fib(int); int main() { int count; std::cout<<\"enter number up to which fibonacci series is to be printed\"<
The problem is exactly here:
int i; for(i<0;i<=count;i++) std::cout<
You are not assigning i any start value. Change it to:
for (int i = 0; i < count; i++) std::cout << p[i] << std::endl;