Posts

Showing posts with the label Format specifier

Format specifier | C Language

Image
  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); }     --------------------------------------------...