Serial Communication between XBee using Arduino

Priyanshu27:
Note: One option I thought is of storing some value in a String and then typecast it into uint8_t and then pass it to data. If we can do something simpler, please suggest me.

It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time. Just use cstrings - char arrays terminated with '\0' (NULL).

uint8_t data[] = "This is Router 1!";

Now, since the data type of data is uint8_t and I want to update its value. So, what shall I do for that?

You have not told us what change you want to make.

If, for example. you just want to change the '1' to a '2' you can do that with

data[15] = '2';

(hope I have counted correctly).
If you want to make a bigger change you could use some the cstring functions

...R