00:01
Okay, so in this question we have a c program and we want to know what this program will output.
00:12
So we're going to go through it line by line.
00:17
I'm going to use pale blue.
00:19
So here we just declared an integer variable name i with value of two.
00:25
So we're going to have i is equal to two.
00:34
And then we create a new scope.
00:36
So when you open a curly bracket, you open and you close a new scope.
00:45
So open a new scope and then later we will close the scope.
01:03
So now everything that happens in this scope between those curly brackets, anything that happens between those curly brackets cannot be seen by what's outside the curly bracket.
01:15
Has precedence so over what's happening outside the curly bracket so it's this is independent of what has come before and after and what has come what will come after has no access to the information in this scope so in this scope we say uh basically we gave value i equals 4 and j equals 5 so it's pretty straightforward and then we print the value of of i and j to a terminal or console window depending on how you want to call it so here i'm going to quickly draw a say in orange i'm going to quickly draw a terminal window here you go one more side okay this is the terminal window so usually terminal window will have something like this and we say print i and j so it will simply print four and five and then we exit the scope that we created earlier and we say print i and print j what is j so print i and j again except there's a problem what is j because j was only declared in the scope that we closed and as we say, when you declare something in a scope, it is not, you cannot use it outside of the scope.
03:55
So we don't know what j is.
04:00
We don't know what j is.
04:14
It is not in the main scope...