Format specifier | C Language

 

Format specifier  :


Format specifier are use in output and  input in C program such as :

 


Format specifier  :

 %d  digit
 %c  character
 %f  floating point number
 %e  floating point number
 %g  floating point number
 %lf  double
 %h  short integer
 %o  octal integer
 %x  hexadecimal integer
 %i  decimal, octal or hexadecimal integer
 %s  string
 %u  unsigned decimal integer
 %Lf  long double
%hd short integer digit
%Lf  long float
%Id  long digit
%hx  hexadecimal integer short   integer



 Basic Syntax :


void main()
{
 int a;
 scanf("%d",&a);
 printf("%d",a);
}  
void main()
{
 char b[20];
 gets(b);
 printf("%s",b);
}
  
-----------------------------------------------------


C Language : part 1

C Language : part 2

Comments

Popular posts from this blog

TOP 10 PROGRAMMING LANGAUAGES COMMING 2021 | ARTICLE

Write a C-program to swap two number:

Print Fibonacci Series using Recursion | C program :