Help with program

Hello
i am very new to arduino and frankly saying have forgot many things in c++ as i am not in touch since about 4 years
there is 3 variables say like example bellow

String sl_no="test_string";
int test_int1=0001;
float test_loat1="0.05";

i wanted to combine them in a string so that i can pass it as an argument in
ether.browseUrl of Ethercard Library

Please help me with this

Please help me with this

First, ditch the stupid String.

char *sl_no="test_string";

Second, this is nonsense:

float test_loat1="0.05";

You can't store a string literal in a float variable.

IF you had:

char *sl_no="test_string";
int test_int1=0001;
float test_loat1=0.05;

you could use dtostrf() to convert the float to a string. Then, you could use sprintf() to convert the string, the int, and the string (from the float) to another string that you could pass to the method.

the float thing i typed by mistake
also as i have told i fabe forgotten many things in c++
please show example of the full code

please show example of the full code

Instead of you googling, reading, and learning something?

char lazy[10];
float pi = 3.14159;

dtostrf(pi, 8, 4, lazy);

int useless = 59;
char *lookItup = "Some string data";

char whatToOutput[50];
sprintf(whatToOutput, "%s, %d, %s", lookItUp, useless, lazy);

Good thing there aren't 4 values to output...

thanks for the compliment
but as i said i have not used c++ for many years and after all no one can memorize coding in all langs

but your code is giving errors

char char_bat_volt[10];
float bat_volt=0.14;
dtostrf(bat_volt, 8, 2, char_bat_volt);

int ac_sts=1;
char *prefix_str = "/test_arduino1";

char web_cmd[50];
sprintf(web_cmd, "%s, %d, %s", prefix_str, ac_sts, char_bat_volt);

ether.browseUrl(PSTR(web_cmd),"", website, my_callback);

webClient.ino:160:21: error: initializer fails to determine size of '__c'
webClient.ino:160:21: error: array must be initialized with a brace-enclosed initializer

i don't think it's needed to post the whole code(lots of lines there)

i am getting error for PSTR(web_cmd)

mdjavedakhtar:
String sl_no="test_string";
int test_int1=0001;
float test_loat1="0.05";

i wanted to combine them in a string so that i can pass it as an argument in
ether.browseUrl of Ethercard Library

I don't understand what "combine them in a string" means.