//C program to return  the Nth row of pascal's triangle
#include <stdio.h>

//Print the nth row of pascal's triangle
void generateNthrow(int N)
{
    //nc0=1
    int prev=1;
    printf("%d",prev);
    
    for(int i=1;i<=N;i++){
        //nCr=(nCr-1*(n-r+1))/r
        int curr=(prev*(N-i+1))/i;
        printf(",%d",curr);
        prev =curr;
    }
}

int main() 
{
    int n=50;
    generateNthrow(n);
    return 0;
}

Embed on website

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