printf() and scanf() functions are inbuilt library functions in C which are available in C library by default. These functions are declared and related macros are defined in “stdio.h” which is a header file.
We have to include “stdio.h” file as shown in below C program to make use of these printf() and scanf() library functions.
C printf() function:
printf() function is used to print the “character, string, float, integer, octal and hexadecimal values” onto the output screen.
We use printf() function with %d format specifier to display the value of an integer variable.
Similarly %c is used to display character, %f for float variable, %s for string variable, %lf for double and %x for hexadecimal variable.
To generate a newline,we use “n” in C printf() statement.
Note:
C language is case sensitive. For example, printf() and scanf() are different from Printf() and Scanf(). All characters in printf() and scanf() functions must be in lower case.
More Stories
Notice: Trying to access array offset on value of type bool in /hermes/bosnacweb05/bosnacweb05bi/b2282/ipg.jbbuidtech37209/timecomputers/wp-content/themes/enternews/inc/template-functions.php on line 601
C tutorial in telugu about Strings Part 36
Notice: Trying to access array offset on value of type bool in /hermes/bosnacweb05/bosnacweb05bi/b2282/ipg.jbbuidtech37209/timecomputers/wp-content/themes/enternews/inc/template-functions.php on line 601
C language tutorial in telugu free download Part 35
Notice: Trying to access array offset on value of type bool in /hermes/bosnacweb05/bosnacweb05bi/b2282/ipg.jbbuidtech37209/timecomputers/wp-content/themes/enternews/inc/template-functions.php on line 601
How to learn c programming in telugu Strings example2 part 34