Currently, I can get two variables into one in js, I am curious how to do the equivalent in c.
my js code:
var buf1 = Buffer.from('a');
var buf2 = Buffer.from('b');
var buf3 = Buffer.from('c');
var arr = [buf1, buf2, buf3];
var buf = Buffer.concat(arr);
console.log(buf);
example output:
<Buffer 37 65 34 30 36 32 62 35 30 33 33 37 33 66 31 34 34 64 37 30 31 34 64 38 66 30 34 30 65 64 31 61 63 35 63 31 31 33 30 32 61 32 66 66 65 38 33 37 38 39 ... >
my c code:
char buff[80];
unsigned char subbuff[64] = "56c5252cd3722bfd3c3147a806bbddaf68b01e020c0cfb60450724a3af45641f";
unsigned char cipher[64] = "7e4062b503373f144d7014d8f040ed1ac5c11302a2ffe83789015665e955ff09";
char bgg[16];
memcpy( bgg, &subbuff[16], 16 );
bgg[15] = '\0';
sprintf(buff,"%s%s",bgg,cipher);
I need combine that data which outputs and buffer like.