Program for binary to decimal and vice versa
two sets of comments. IS the functionality sensible or not? Is the code good / open to improvement etc?

Firstly the functionality

Its very odd to put 101 into an int and say that its 5. The number 5 in an int is always 5, it has various string representations depending on the base used to display it. I would have much preferred seeing 2 functions:


one that accepts a string is a given base and gives that returns the valur of it as an int
one that takes an int and displays it as a string using a given base


In effect you would be recoding atoi and itoa

Now about the implementation of the features you implemented

First the code works, ++ for that. Nicely split into functions etc. ++

No Comments -- Gotta have at least some.

commonly accepted c practice is to define and initialize variables on first use. (Old compilers required all variables to be declared at start of scope, not any more)

for exmaple

   char m;
    printf("\nType b for binary to decimal conversion or d for decimal to binary conversion (max 65535)\n");
    m = getchar();


is better as

printf("\nType b for binary to decimal conversion or d for decimal to binary conversion (max 65535)\n");
char m = getchar();


You alignment is somewhat funky. Commonly accepted c styles are

while(n &gt;= 1)
{
    ++x;
    n /= 10;
}


or

while(n &gt;= 1){
   ++x;
   n /= 10;
}


your should '\n' on the last line of your output, its considered polite.

I would have made the conversion functions return something rather than having them do the printing. Imagine you needed to do something else with the converted value

There is no error checking. Entering 42 and asking for a 'b' conversion returns 0. THis is in fact an error, you should say so.

n,z,x are not obvious names. I see that z is a copy of n so you can restore it later, call it saven or something like that

Now for the actual logic. Given that you are doing such a strange thing I find it hard to really comment on it. But its not very clear. Taking convert, I would have converted the input to a string , base 2, then scanned the string back as decimal.