"Module codes" is not a standard term so I have no idea what that is. But since you are storing them in a 2D array of char they are most likely either single characters (but then why are they in a 2D array?) or regular C strings (up to seven characters and a final '\0' character).
Since you didn't specify, I'll just assume the latter. If they aren't sorted then you need to compare each one to all of the ones following it. If they are sorted you just need to compare each to the next one and if it's the same, remove the duplicate and compare again.
Example of an unsorted list:
Code:
#include <stdio.h>
#include <string.h>
int main() {
char m[8][8] = {
"one",
"two",
"one",
"one",
"three",
"four",
"three"
};
int size = 7; // 7 strings in the array
for (int i = 0; i < size; ++i)
for (int j = i + 1; j < size; )
if (strcmp(m[i], m[j]) == 0) {
for (int k = j + 1; k < size; ++k)
strcpy(m[k - 1], m[k]);
--size;
}
else
++j;
for (int i = 0; i < size; ++i)
printf("%s\n", m[i]);
return 0;
}