← Back to Question List
C Code Walkthrough #1
Integer Division Truncation
📄 Code
Read carefully — what does this print?1#include <stdio.h>23int main() {4 int a = 7;5 int b = 2;6 int result = a / b;7 printf("%d\n", result);8 printf("%.2f\n", (float)a / b);9 return 0;10}