|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
printf problem
Hi,
I am trying to print the examples in the printf_lib.c commented examples. I initialized the variables as directed and then called the following each second. Code:
printf("%s\n",StrPtr); //will display 'Hello world!'
printf("X = %d, Y = %x, Z = %lx\n",x,y,z); // will display 'X = 15'
// 'Y = 0x50'
// 'Z = deadface'
printf("X = %b (base 2)\n",x); // will display 'X = 1111 (base 2)'
printf("X = %16b\n",x); // will display 'X =
// 0000000000001111'
printf("X = %04x\n",x); // will display 'X = 000f'
Code:
H 1 5 ddf 1 01 0 ...sometimes I get this... H 1 5 ddf= 12 01 0 Regards, ChuckB |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Anyone with a replacement Printf? | Larry Barello | Programming | 5 | 19-03-2004 02:20 |
| Victor problem | Andy Baker | Electrical | 15 | 24-06-2003 09:49 |
| Ok one problem | cantwell03 | Programming | 3 | 13-02-2003 07:28 |
| The problem with scouting... | archiver | 2001 | 10 | 23-06-2002 23:49 |
| Major problem with chipphua motors | aka Scott White | Motors | 18 | 19-03-2002 19:44 |