void swap(int *a,int *b)
printf(“enter the value of n\n”);
scanf(" %d", &n);
printf("enter the element\n");
scanf(" %d", &a[i]);
I ran your code and error seems to be simple. There are two errors according to an Online Judge:
Output error(personal error): This can be dealt with by simply assigning
l = n after input of n. You can also replace l by n since n is non-changing and l is not required.
Runtime error: This is due to using void main. Since there is no return value to judge, it shows runtime error.
Try changing limits of both loops to N. I feel you have an issue with limit of inner loop.
not getting output then also