Answers for "c programming interview questions basic"

C
0

c interview questions for experienced

#include <stdio.h>#include <conio.h>long factorial (int n){    if (n==0)    return 1;    else    return (n * factorial(n-1)); //recursion}void main(){    int number;    long fact;    printf("Enter a number: ");    scanf("%d", &number);    fact = factorial(number);    printf("The factorial of %d is %ld!n", number, fact);    getch();}
Posted by: Guest on November-18-2020

Code answers related to "c programming interview questions basic"

Code answers related to "C"

Browse Popular Code Answers by Language