Can anyone tell me what's wrong in my code ... I'm still a beginner started with c programming
#include <stdio.h> #include <stdlib.h> int main() { int a[10],i,j,temp,key ,low,high,mid,n; printf("Enter how many elements you want to store"); scanf("%d",&n); printf("Enter %d elements into your array",n); printf("\ngiven elements are \n "); for (i=0;i<n;i++) { printf("\t %d", a[i]); } for (i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(a[i]<a[j]) temp = a[i]; a[i] = a[j]; a[j] = temp; } } printf("given elements in ascending order "); for(i=0;i<n;i++) { printf("\t %d ",a[i]); printf("Enter search key elements"); scanf("%d",&key);