#include <stdio.h>
#include <string.h>
#include <stdlib.h>

 int main(void) {

       char putEndpoint[] = "PUT /api/v1/products/";
       char http[] = " HTTP/1.1";
       char *putRequestEndpoint;

       putRequestEndpoint=malloc(strlen(putEndpoint)+strlen(http)+1); //allocating memory

       sprintf(putRequestEndpoint,"%s%s",putEndpoint,http);
       printf("%s\n",putRequestEndpoint);
       printf("%s",putEndpoint);
       free(putRequestEndpoint);  //freeing memory
       return 0;
   }