Help using next command in UnixLunix Consider the code int m
Help using next command in Unix/Lunix
Consider the code:
int main() {
int a = 0;
int b = 1;
a = b; }
After you type in ‘next’, you see a = b;
What will be the value of a?
is it a = 0 or a= 1? and why?
Solution
Ans: a = 1
int main() {
int a = 0; // declaring a variable \'a\' and initializing with 0
int b = 1; // declaring a variable \'b\' and initializing with 1
a = b; // here assigning value of \'b\' in \'a\', so \'a\' contains 1
}
