I am newbie c language learner. Please let me know how can I define a string and concatenate some integer values with string and print it too. I also need to send that string data to a server using a API.
I tried below but it shown strange characters in print and I guess it will send same strange characters when I sent it to server using API. Please guide.
strcpy (str," ");
strcat (str," Y:");
strcat (str," Z:");
sprintf("Data: '%s'\n", str); // show strange characters...