It's been a long time since I don't use printf that i almost forgot it.
gives meCode:int var = 8; printf("%d", var);
but I want 2 digit 8, I know it was something between "%" and "d" but i cannot remember.Code:8
something like:
Code:08
This is a discussion on silly printf("%d", var) question within the C Programming forums, part of the General Programming Boards category; It's been a long time since I don't use printf that i almost forgot it. Code: int var = 8; ...
It's been a long time since I don't use printf that i almost forgot it.
gives meCode:int var = 8; printf("%d", var);
but I want 2 digit 8, I know it was something between "%" and "d" but i cannot remember.Code:8
something like:
Code:08
Mac OS 10.6 Snow Leopard : Darwin
Code:printf("%02d", var);
Feel free to look at this