The following code shows how to Find Whether a Number is a Strong Number or Not in C.

//Find Whether a Number is a Strong Number or not

#include <stdio.h>
long factorial(int n)
{
    long f=1, i;
    for(i=1;i<=n;i++)
        f*=i;
    return f;
}
int main()
{
    int mynum, temp, rem;
    long digitsum=0;
    printf("Enter a Number: ");
    scanf("%d", &mynum);
    temp=mynum;
    while(temp!=0)
    {
        rem=temp%10;
        digitsum+=factorial(rem);
        temp=temp/10;
    }
    if(digitsum==mynum)
    {
        printf("%d is a Strong Number!\n", mynum);
    }
    else
    {
        printf("%d is not a Strong Number!\n", mynum);
    }
    return 0;
}

Output

Enter a Number: 145
145 is a Strong Number!

Enter a Number: 384
384 is not a Strong Number!

Enter a Number: 40585
40585 is a Strong Number!


Further Reading

50+ C Programming Interview Questions and Answers

C Program to Find Factorial of a Number