Question: I have a board that contain number 1 to 40.How to choose or select the number on the board. using C programming language

Answer: 
Possible approach might be:

* create some representation of "board" with its initial state

and then:
1. read a single character from the input
2. determine the action based on input
3. change the state of the board
4. output the whole board reflecting its state
5. repeat

... and as a part of step 2., if the `Enter` has been pressed, stop this loop and display the info about the selected number or whatever is supposed to happen.
What you are describing can be represented with a two dimensional array in C. Try:

```
arr[40][40];

```

And then you could iterate through the matrix as you wish to locate the sixth number of either dimension. But without more information or code on your part, I can't be more helpful.