So I have this problem where I have to figure out the output using two different scoping rules. I know the output using lexical scoping is a=3 and b=1
a=3
b=1
C is not a dynamically scoped language. If you want to experiment in order to understand the difference, you're better off with a language like Perl which lets you chose between both.