1. ## output of this

can anyone help me with this....i was wondering what does "<<" do????? and what does it do over here:-

Code:
```void g(int b[][SIZE], int m, int n)
{
int j, k, x = 0;
for (k = 0; k < n; k++)
m = 3, n = 2
{
for (j = 0; j < m; j++)	              b = 3 4 << row0
x = x + b[j ][k ];	              6 5 << row 1
printf(”%d^%4d\n”, k, x);7 2 << row 2
}
}
Show output of g(b, m, n)```

2. << is bit shifting. It shifts to the left.

Example:

printf("1 shifted %d places to the left is %d\n", 3, 1<<3 );

There is also a right shift, which shifts the opposite direction.

Think of it as if there was a "binary decimal point" some place, and you shift the whole number to the left or right, while the decimal stays put.

0000.0000

left shift:

00000.000

right shift:

0000.0000

See, there is no real decimal point, but in effect if you visualize it, that's what it looks like it does. Each shift to the left is like increasing by a power of two. Each shift to the right is like dividing in half.

Quzah.

3. Its a guess of mine and is probably correct.

those three statement with << when written separate are

3 4 << row0
6 5 << row 1
7 2 << row 2

So it might be suggesting input array b.

as

3 4
6 5
7 2

And the programmer has forgotten to put comments there
These statements have nothing to do with program as far as my logic says.

--------------------------------------------------------------------------------

4. Originally posted by Dev
Its a guess of mine and is probably correct.
...
These statements have nothing to do with program as far as my logic says.
Yep. That looks like it. I didn't even bother to glance at the code. In C, the only thing << does is a left shift, so that's the answer I gave.

Quzah.

5. thanks alot dude
really helped me alot