Hi, I am interested in implementing a lookup table in code segment as below. LUT[] = { {0x01020304, "String1"}, {0x05060708, "String2"}, {0x0b0c0d0e, "String3"}, {0x22334455, "String4"} }; How can I write a function such that if i pass the first 4-bytes data then it returns back the corresponding String from the lookup table? Any help would be great. Azra
Frankly, if you can't solve that one yourself then you're in way over your head. This doesn't have anything to do with C51 yet. This is extremely basic C and algorithms knowledge. Get a textbook, sit down and learn how to program.