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.
Actually i think i understand your problem, First you should know that every key on keyboard will be represented in numbers.

1) Do you know ASCII codes concept???.characters like `'A'` or `'a'` or `'1'` are represented in there ASCII CODE,See ASCII table for more information. 

`'A'`will be 65 and 

`'B'` will be 66 and 

`'C'` will be 67..........so on

so when you press `'A'` on keyboard it will be stored as 65 in your program.

Lets Understand that with some Code:-

```
#include<stdio.h>
int main()
{
    char ch1='\0';
    printf("\nPlease Enter any key from keyboard:");
    ch1=getche(); 
    printf("\nValue of that key is : %d",ch1);  

return 0;
}

```

**Output for above Code is**:-

Please Enter any key from keyboard:**A**

Value of that key is : **65**

Please Enter any key from keyboard:**B**

Value of that key is : **66**

Please Enter any key from keyboard:**C**

Value of that key is : **67**

Now You Can use the Above Code to know the Actual values of **your arrow keys or any other key from keyboard**. I believe that the values of **arrow keys** on keyboard are not same for every machine(computer). So you have to know your specific values for every key that you want to use.

After knowing the values of arrow keys its piece of cake for you.

Now lets see what are my Values for arrow keys on my machine with same code:-

```
int main()
{
  int ch1='\0';
  int ch2='\0';
  printf("\nPlease Enter Key from keyboard:");
  ch1=getche(); //unwanted number.
  ch2=getche();// Actual wanted number.
  printf("\nUnwanted Value is : %d",ch1);
  printf("\nValue of that key is : %d",ch2);
 return 0;
}

```

As you see i have modified the code because on my computer when i press *arrow keys or del key or home key or end or pageUp or PageDown keys*,**these keys throws Two numbers**, so i used two variables to catch these two values.

**output of above Code is:-**

Please Enter Key from keyboard: **(Up was pressed here)**

Unwanted Value is : 224

**Value of that key is : 72**

Please Enter Key from keyboard: **(Down was pressed here)**

Unwanted Value is : 224

**Value of that key is : 80**

Please Enter Key from keyboard: **(right was pressed here)**

Unwanted Value is : 224

**Value of that key is : 75**

Please Enter Key from keyboard: **(left was pressed here)**

Unwanted Value is : 224

**Value of that key is : 77**

You must Ignore the value of first variable i,e 224. Because its just some number but value of second variable is important, its the Actual value of the key pressed from keyboard.
Now from Above output my values for **{ up, down, right, left}={ 72, 80, 75, 77}** 

After knowing the values for arrow keys i can do what ever i want like this:-

```
if(ch2==72)// when UP key pressed 
    //do something
else if(ch2==80) //when DOWN key pressed 
    //do something
else if(ch2==75)//when RIGHT key pressed 
    //do something.
else if(ch2==77)//when LEFT key pressed 
    //do something.

```