Original problem described at http://primepuzzle.com/tc/tiny-c-comedian.html

Ref : Blaine's Puzzle Blog

Due to the memory limitations of tiny-c, I implemented the solution via http://primepuzzle.com/tc/comedian.ipl and used actress and comedian files that were smaller than the complete ones I found on the internet.

Here's a screen-scrape of the tail end of a run.

 236 BRIDGET FONDA
 237 ROSANNA ARQUETTE
 238 TIA CARRERE
 239 FAIRUZA BALK
 240 JENNIE GARTH
 241 ANDREA PARKER
 242 JULIETTE BINOCHE
 243 SHAWNEE SMITH
 244 KELLY ROWAN
 245 ELIZABETH BERKLEY
 246 MAURA TIERNEY
 247 EMILY VANCAMP
 248 CARRIE FISHER
 249 GLENN CLOSE
 250 DEBRA WINGER

analyzing ...

Press Enter ...

 0
 1 2 3 4 5 6 7 8 9 10
 11 12 13 14 15 16 17 18 19 20
 21 22 23 24 25 26 27 28 29 30
 31 32 33 34 35 36 37 38 39 40
 41 42 43 44 45 46 47 48 49 50
 51 52 53 54 55 56 57 58 59 60
 61 62 63 64 65 66 67 68 69 70
 71 72 73 74 75 76 77 78 79 80
 81 82 83 84 85 86 87 88 89 90
 91 92 93 94 95 96 97 98 99 100
 101 102 103 104 105 106 107 108 109 110
 111 112 113 114 115 116 117 118 119 120
 121 122 123 124 125 126 127 128 129 130
 131 132 133 134 135 136 137 138 139 140
 141 142 143 144 145 146 147 148 149 150
 151 152 153 154 155 156 157 158 159 160
 161 162 163 164 165 166 167 168 169 170
 171 172 173 174 175 176 177 178 179 180
 181 182 183 184 185 186 187 188 189 190
 191 192 193 194 195 196 197 198 199 200
 201 202 203 204 205 206 207 208 209 210
 211 212 213 214 215 216 217 218 219 220

bingo!

comedienne's name begins w/ CHER and ends w/ TERI
actress' name begins w/ TERI and ends w/ CHER

please visit http://primepuzzle.com/tc/comedian.html





/* 1 announce, declare, initialize
/* 2 loop on the two input files
/* 3 initialize
/* 4,5 read a file, complain and exit on error
/* 6 locate first "* " and " (" in file, announce and wait for key strike
/* 7 loop while there's anything left in file
/* 8,9 copy stuff between * and ( to work area
/* 10 nul terminate work area, show progress, copy work area to another work area 
/* 11,12,13 put first four characters in either first comedian or first actress array
/* 14 copy work area to another work area, find length of string, copy last four characters to beginning of string, nul terminate
/* 15,16,17 put last four characters into either last comedian or last actress array
/* 18 bump pointer (subscript) used by first / last comedian / actress arrays, remove processed name from scratch array, locate next "* "
/* 19,20,21 locate next " (", if any
/* 22,23,24 establish number of comedians or actresses 
/* 25 adjust number of comedians / actresses (divide by 4), announce beginning of analysis phase, wait for key strike
/* 26 loop on comedians
/* 27,28,29 show progress, print new line every 10
/* 30 loop on actresses
/* 31 if first four characters of comedian's name equal last four characters of actress' name
/* 32 if first four characters of actress' name equal last four characters of comedian's name
/* 33 announce success! etc. and exit