Your teacher has assigned several homework assignments whose due-dates are spaced out over the course of the semester. You don't bother to do any of them. The night before the final, you realize what a mistake that was, and you hurriedly do all of the homework assignments in succession. On entering the final exam, you plop the lot of them on the teacher's desk, unceremoniously and without explanation. This hail-Mary hand-in subsequently becomes an object of incredulity and amusement among your teacher's colleagues.
To go into something 'cock in hand' means to enter it with confidence, not confident that you will succeed but simply confident that you are in fact entering into that endevour.
Robbie walked into math class only to find there was a homework quiz that day. Robbie never did any of his homework and had no idea what they had been studying. But, Robbie wouldn't let it get him down. He went into that quiz cock in hand and failed it with dignity.