I got my answer. We can use "$?>>8" to get the read the return value, however it's returning only positive value.Any one knows how to read the negative values as well
Comment on Re^2: Reading return value from C program
But that won't tell you whether the program has specified its exit code as a negative number. All you get is the least significant eight bytes of the value.