how to enter String+Float to a char array??

char remoteNumber[20]= "number here";
char txtMsg[200]="message here";

hello ,
so i am using this to character arrays to enter the number and Message on the GSM Sheild!
i've searched different places but cant find how to add them.
my purpose is i want to change the number or message in other parts of the code according to conditions
so how do i do it?
if i have integer values and float values and i want to enter them to that array of characters how do i do it?

char remoteNumber[20]= "number here"; 
char txtMsg[200]="message here";
float x=1.11;
float y=2.22;
int   z=12345;

remoteNumber[20]=z; // i suppose this should work, but what if i want to enter a word before that int?
txtMsg[200]="Value X=%f , Value Y=%f",x,y;

plz fix it or give me new directions

  1. figure out were the longitude and latitude variables are so i can put them in the array of characters

Define them anywhere you want. In the snippet of code you showed, they are defined in gpsdump(). The gps.f_get_position() will store the lat and lon values in the two arguments specified.

  1. writing the 2 float or double variables in the message something like "longtitude="+X+" latitude="+Y;

You'll need to use dtostrf() to convert each float to a string, then use sprintf(), strcat(), or other string functions to create a string that can be sent.

PaulS:
Define them anywhere you want. In the snippet of code you showed, they are defined in gpsdump(). The gps.f_get_position() will store the lat and lon values in the two arguments specified.
You'll need to use dtostrf() to convert each float to a string, then use sprintf(), strcat(), or other string functions to create a string that can be sent.

ok thanks part 1 worked , now working with part 2.. to add a message and the float number in the same array
thanks sir