You are on page 1of 1

printf() Function- What is the difference between "printf(...)" and "sprintf(...)"?

sprintf(...) writes data to the character array whereas printf(...) writes data to the standard
output device

extern i;

static void fun(int x)

//printf("in fun i=%d",i);

i=100;

printf("in fun i=%d\n",i);

You might also like