I'm getting SIGSEGV error in codechef, not in compiler

see the compiled code at http://ideone.com/gIWKI1

state the problem which you are trying to solve !!

I think the question is http://www.codechef.com/problems/ROTATION/

you dont need the this loop in lines 31 and 48.

for(i=0;i<size;i++)

because of these for loops variable ‘k’ reaches a value of size*size where as
you have allocated array ‘b’ only ‘size’ ints.
remove these for loops ideone link and you wont get any sigsev error but you will get tle(time limit exceeded).
see the editorial for faster algorithm.
a small suggestion try to write code with indentation as it will help you in reading code and debugging.