Justification in printf() - C Language Basics

C examples for Language Basics:printf

Description

Justification in printf()

Demo Code

#include <stdio.h>
int main()/*from  w w  w  .ja  va  2s  . c o  m*/
{
   printf("%15s","right\n");
   printf("%-15s","left\n");
   return(0);
}

Result


Related Tutorials