Using < 0x10 ? " 0" : " " in serial print

Can’t seem to find any reference to explain what this does.

Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ");
I know it prints the array number but what does the
*< 0x10 ? " 0" : " " *
do?
very much thanks for any help given

Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");

Is equivalent to

if ((mfrc522.uid.uidByte[i] < 0x10)
{
  Serial.print(" 0");
}
else
{
  Serial.print(" ");
}

Note the use of code tags above to prevent the array index in your code being interpreted as an HTML italics tag

Look for ternary operator

Net effect: Prints the leading zero of a hex number that is less than 16 and would therefore not have it. "0c" instead of just "c"

Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ") can any one explain it to me please ? I did not understand the condition

What is it that you don't understand? The link to the description of the ternary operator is still valid so what else is the problem? (hint - the ternary function is sometimes called 'immediate if' - iif).

Elaf07:
Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ") can any one explain it to me please ? I did not understand the condition
[/quote]
Do you mean that you did not understand the question which, incidentally, has already been correctly answered ?