Sunday, 1 September 2013

WHAT DOES PRINTF FUNCTION RETURNS

If you observe the syntax of printf statement

int printf(const char *string..........) ,so printf is an function that returns an integer value

>>Thus printf  return an integer value i.e. the number of charecters that has been sucessfully transfered to output buffer

example

int k;
k=printf("hello world");

printf("\n k=%d",k)

the value of k would be 11

No comments:

Post a Comment