hh:mm how to divide it and put it into different arrays ??

Let's say, I've 2:30 stored in time[5] array which is of type "char". I want to divide the char array into hour[2] and min[2] (in the above case hour will get assigned 2 and min will get assigned 30). But i dunno how to achieve it. I tried using pointer and so did strncpy() function. However, it doesn't seem to be working. Please help me out of this . Thanks everyone in advance.
Sounds like a homework assigment, but I'll give one hint: have you noticed that the hours are stored in the first two elements and the minuts in the last two?
Topic archived. No new replies allowed.