Hi,
when doing this..
sprintf(req_line1, "%c%s%c", '\x0b',"TESTING1",'\x0d');
sprintf(req_line2, "%s%c", "TESTING2", '\x0d');
sprintf(req_line3, "%s%c", "Testing3", '\x0d');
sprintf(req_line4, "%s%c%c%c", "Testing4", '\x0d', '\x1c', '\x0d');
sprintf(req_msg, "%s%s%s%s", req_line1,req_line2,req_line3,req_line4);
There are few extra characters are getting appended into the req_msg variable. When i print out the hex decimal values (using printf ("%0X", req_msg[i])) for this. here is what it is printing...
[D] [1C] [D] [7F] [45] [4C] [46] [1] [2] [1]
My last line ends with '\0xD', '\0x1C' and '\0XD' print here correctly. But appends with some junk values at the end [7F] [45] [4C] [46] [1] [2] [1] not sure where how it's printing this values. Can somebody please help me...
can somebody pelase help me .....
thanks
Cheers
Sudharma.