Why is BSS not increasing under the presence of a global static variable?

Viewed 61

I am running on a 64-bit Windows system and currently trying to learn C. The codes are given below.

Code 1

#include<stdio.h>

int main() {
}

Size:

   text    data     bss     dec     hex filename
   9724    2200    2432   14356    3814 main.exe

Code 2

#include<stdio.h>

static int i;
int main() {
}

Size:

   text    data     bss     dec     hex filename
   9724    2200    2432   14356    3814 main.exe
0 Answers
Related