HR interview
Interview
Programming
Puzzles
#include
int main(){
int a,fact=1;
scanf("%d",&a);
for(i=1;i<=a;i++)
{
fact=fact*i;
}
printf("%d",&fact);
}}
Read Solution (Total 2)
-
- not initialised i and one close loop was given extra then printf address should not be given....then only it shows the factorial value.....
- 6 years agoHelpfull: Yes(1) No(0)
- Here header file is not declared and also not declare the i variable
- 5 years agoHelpfull: Yes(1) No(0)
HR interview Other Question