← Back to Question List
C Code Walkthrough #8
Global vs Local Variable
📄 Code
Read carefully — what does this print?1#include <stdio.h>23int x = 10;45void change() {6 int x = 20;7 printf("%d\n", x);8}910int main() {11 printf("%d\n", x);12 change();13 printf("%d\n", x);14 return 0;15}