Following is my code.
Code:
//Array passing to Function
#include<stdio.h>
#include<stdlib.h>
void display(int ,int);
void main()
{
    int i,ar[10],n;
    printf("\n Enter the no of no's->");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        printf("\n Enter no->");
        scanf("%d",&ar[i]);
    }
    display(ar[10],n);
}
void display(int ar[10],int n)
{
    int i;
  for(i=0;i<n;i++)
    {
        printf("\n Enter no->%d",ar[i]);
    }
    }
It is compiling fine. But when I am pressing Ctrl-F9 to run it, I am getting this error.

Undefined symbol display(int,int) in noname00.cpp

where my file name is "noname00.cpp". I have tried with other file names, but no success. Please help me finding the error. Thanks.