Good evening
I am using this code
strcpy_P(str_aux1, (char*)pgm_read_word(&(table_AT[22]))); //"+SAPBR=?"
snprintf(str_aux1, sizeof(str_aux1), "%s=2,%u", str_aux1,n_conf);
Once I had a table to have the definition between the %s, %u or %d.
Do you know where I can find it?
What the différence betweem %d and %u
%d is for the decimal, isn't? and %u?
Thank a lot
Just a guess, "unsigned?"
system
September 27, 2015, 10:14pm
3
Just a guess, "unsigned?"
No need to guess. All the format specifiers are well documented, and in less time than it took to post the question, OP could have used google to get an answer.
vaj4088
September 27, 2015, 10:16pm
4
You should look for "Type field" in printf format string - Wikipedia
%d is for a decimal signed int. %u is for an decimal unsigned int.
Bing and Google are your friends.
Thank vaj4088 for the link. I saved it in my favorite!
I wish you a nice day!