#include <stdio.h>
#include<limits.h>
int main() {
    int arr[20];
    int i,N, largest,sec_largest=INT-MIN,pos;
    printf("enter size of array:");
    scanf("%d",&N);
    printf("enter %d elements in array:",\N);
    for(i=1;i<=n;i++)
    {
    scanf("%d",&srr[i]);
    }
    sec_largest=INT_MIN;
    for(i=1;i<=N;i++)
    {
        if(arr[i]!=largest&&arr[i]>sec_largest)
    {
        sec_larest=arr[i]
        pos=i;
    }
    }
    printf("sec_largest is %d\n",sec largest);
    printf("largest no is %d\n",largest);
    printf("sec_largest postion %d\n",pos);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: