Consider this code:

#include <stdio.h>

int main(){
        printf("I'm this cool right now: [%d]\n",0);
}

And the compiled binary:
student@csci4971:/tmp$ gcc -o a a.c
./a
student@csci4971:/tmp$ ./a
I'm this cool right now: [0]

Lets fire up gdb and patch that to something better than 0.

(gdb) disas main
Dump of assembler code for function main:
0x080483e4 <main+0>:	lea    0x4(%esp),%ecx
0x080483e8 <main+4>:	and    $0xfffffff0,%esp
0x080483eb <main+7>:	pushl  -0x4(%ecx)
0x080483ee <main+10>:	push   %ebp
0x080483ef <main+11>:	mov    %esp,%ebp
0x080483f1 <main+13>:	push   %ecx
0x080483f2 <main+14>:	sub    $0x14,%esp
0x080483f5 <main+17>:	movl   $0x0,0x4(%esp)
0x080483fd <main+25>:	movl   $0x80484e0,(%esp)
0x08048404 <main+32>:	call   0x804831c <printf@plt>
0x08048409 <main+37>:	add    $0x14,%esp
0x0804840c <main+40>:	pop    %ecx
0x0804840d <main+41>:	pop    %ebp
0x0804840e <main+42>:	lea    -0x4(%ecx),%esp
0x08048411 <main+45>:	ret    
End of assembler dump.
(gdb) 

T
The printf call is here:

0x080483f5 <main+17>:	movl   $0x0,0x4(%esp)
0x080483fd <main+25>:	movl   $0x80484e0,(%esp)
0x08048404 <main+32>:	call   0x804831c <printf@plt>

Two arguments are being pushed.
Argument 1 is:
(gdb) x/s 0x80484e0
0x80484e0:	 "I'm this cool right now: [%d]\n"

Argument 2 is: 0x0

The instruction that pushes the 0 is 8 bytes long (fd - f5)

0x80483f5 <main+17>:	0xc7	0x44	0x24	0x04	0x00	0x00	0x00	0x00

The 0 happens to be the last 4 bytes. The exact format of your instruction
can be found in the instruction manuals. Or through trial and error, you'll
start to get a feel for it.

(gdb) break main
Breakpoint 1 at 0x80483f2
(gdb) r
Starting program: /tmp/a 

Breakpoint 1, 0x080483f2 in main ()
(gdb) set *0x80483f9 = 0x00000539

Now the program is patched.

(gdb) disas main
Dump of assembler code for function main:
0x080483e4 <main+0>:	lea    0x4(%esp),%ecx
0x080483e8 <main+4>:	and    $0xfffffff0,%esp
0x080483eb <main+7>:	pushl  -0x4(%ecx)
0x080483ee <main+10>:	push   %ebp
0x080483ef <main+11>:	mov    %esp,%ebp
0x080483f1 <main+13>:	push   %ecx
0x080483f2 <main+14>:	sub    $0x14,%esp
0x080483f5 <main+17>:	movl   $0x539,0x4(%esp)
0x080483fd <main+25>:	movl   $0x80484e0,(%esp)
0x08048404 <main+32>:	call   0x804831c <printf@plt>
0x08048409 <main+37>:	add    $0x14,%esp
0x0804840c <main+40>:	pop    %ecx
0x0804840d <main+41>:	pop    %ebp
0x0804840e <main+42>:	lea    -0x4(%ecx),%esp
0x08048411 <main+45>:	ret    
End of assembler dump.
(gdb) 


(gdb) c
Continuing.
I'm this cool right now: [1337]

Program exited with code 040.
(gdb) 

