The output of the code is ___.int fact=1;for (i=1; 4; i++){ fact=fact*i; printf(“%d”, fact);}ans.12024Infinite loop6 Previous Marked for Review Save & Finish
Question
Solution 1
The code you've provided seems to be written in C or C++, but it contains some errors. Here's the corrected version:
#include <stdio.h>
int main() {
int fact = 1;
for (int i = 1; i <= 4; i++) {
fact = fact * i;
printf("%d\n", fact);
}
return 0;
}
This code Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study prob
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solv
Similar Questions
The output of the code is ___.int fact=1;for (i=1; 4; i++){ fact=fact*i; printf(“%d”, fact);}ans.12024Infinite loop6 Previous Marked for Review Save & Finish
The output of the code is ___. int fact=1; for (i=1; 4; i++) { fact=fact*i; printf(“%d”, fact); } ans. Infinite loop 6 120 24
What will be the output of the C program? ans.1 88 82 21 1 Previous Marked for Review Next
The output of the code is ___. int fact=1; for (i=1; 4; i++) { fact=fact*i; printf(“%d”, fact); } 120 Infinite loop 24 6
Which will be the output? #include<stdio.h> int main () { char i=65; printf (“%d”, sizeof(i)); return 0; } ans. 2 8 4 1