Let's start with the first code.

The briefly called variables are:
c -> column
cl -> column last
r -> row
rl -> row last

no -> neighbor offset
noi -> neighbor offset index

nx -> neighbor x coordinate
ny -> neighbor y coordinate

Once you have the maze constructed, you have to check the cells that has just one neighbor navigable. If you look at the cell style defines you will realize that all the navigable cells are bigger than WALL. Note that only odd cells (starting with 0) can be deadends.

So...
Code:
int pos_x = 1;
for ( pos_x=1; pos_x<size_x; pos_x +=2 ) // go trough every odd columns
{
   int pos_y = 1;
   for ( pos_y=1; pos_y<size_y; pos_y+=2 ) // go trough every odd row on each column
   {
      if ( array_cell(maze,pos_x,pos_y) > WALL ) // is the current cell a navigable cell?
      {
         int nc = 0; // neighbor count
         int noi = 0;
         for ( noi=0; noi<4; noi+=1 ) // go trough every couple of members of neighbor offset array
         {
            int nx = pos_x + no[noi][0]; // calculate the neighbor coords
            int ny = pos_y + no[noi][1]; 
            if ( array_cell(maze,nx,ny) > WALL ) // is the current neighbor a navigable cell?
            {
               nc += 1; // increase the neighbor count by one
            }
         }
         if ( nc == 1 ) // has the current cell just a single neighbor?
         {
            array_cell(maze,pos_x,pos_y) = DEADEND; // it is a deadend
         }
      }
   }
}



Salud!