Advertisement

INPUT OUTPUT function

 printf() and scanf() in C

the printf() and scanf() function are used for input and output  in C language. Both functions are inbuilt library functions, defined in stdio.h (header file)

printf() function

the printf() function is used for output. It prints the given statement to the console. The syntax of printf() function is given below:

1. printf("format string",argument_list);

    The format string can be %d (integer), %c (character), %s (string), %f (float) etc.


scanf() function

the scanf() function is used for input. It reads the input data from the console.

1. scanf("format string",argument_list);

Redmi Note 10T

Post a Comment

0 Comments