Consider this code snippet:

I'm trying to find the code that declares the global variable in Ollydbg.
I can't find where it is.
Consider this code snippet:

I'm trying to find the code that declares the global variable in Ollydbg.
I can't find where it is.
The C compiler doesn't create any assembly code to declare and initialize global fundamental data types, so you won't see anything like MOV ..., 3 in OllyDbg for your program above.
In the disassembly of your program below, you can see that the global variable is stored at dword_402000, which is hardcoded to begin with a value of 3:
