String alignment : String Display « String « C Tutorial






#include <stdio.h>
 
int main(){
   printf("%15s","right\n");
   printf("%-15s","left\n");
   return(0);
}
right
      left








3.4.String Display
3.4.1.Displaying a string
3.4.2.String alignment