How to use printf and scanf functions in C.|| Deffrence Between Printf And Scanf.
1.printf() function in C language:
*In C programming language, 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.
2. scanf() function in C language:
*In C programming language, scanf() function is used to read character, string, numeric data from keyboard
*Consider below example program where user enters a character. This value is assigned to the variable “ch” and then displayed.
*Then, user enters a string and this value is assigned to the variable “str” and then displayed.
C Programming Language Full Course Topics Features of C
#Addresses in C
#Pointers in c
#Array pointer
#Structures 🛠
#Struct pointers
#Typedef in c 🍯
#C Preprocessor
#Preprocessor directives
#File Input/Output 🗃
#Opening files
#Reading and writing file functions
#Using memmove in array
#about c language
#system programming
#Features of C language
#Definition and declaration.
#Initialization.
#Indirection operator.
#Address of operator.
#Pointer arithmetic.
#Dynamic memory allocation.
#Arrays and pointers.
#Function and pointers.
#My First C program
#Compile and Run C program
#C Syntax Rules
#Keywords and Identifier
#Data Types in C
#Variables in C
#Operators in C Language
#C Input / Output
#Decision Making
#if
#if else statement
#Switch Statement
#Looping
#Arrays
#string and character array
#Storage classes
#Functions in C
#Addresses in C
#Pointers in c
#Array pointer
#Structures ??
#Struct pointers
#Typedef in c ??
#C Preprocessor
#Preprocessor directives
#File Input/Output ??
#Opening files
#Reading and writing file functions
#Using memmove in array
#Introduction to Functions
#Types of Functions and Recursion
#Types of Function calls
#Passing Array to function
#Structures in C
#All about Structures
#Typedef
#Unions
#Pointers in C
#Pointers concept
#Declaring and initializing pointer
#Pointer to Pointer
#Pointer to Array
#Pointer to Structure
#Pointer Arithmetic
#Pointer with Functions
#Advanced Topics in C
#File Input / Output
#Error Handling
#Dynamic memory allocation
#Command line argument
#graphics in c language
------------ Support me By ( Free) -----------------
LIKE | COMMENT | SHARE | SUBSCRIBE