A Different Type Of Printf

Code Id 3
Date Updated 3/7/2010
Title A different type of printf  
Write an expression of the form printf("%s",...) having exactly the same effect as printf("%5d",123). 
Codes Snippet
int main(void)
  char x[10];
  char y[10];

  sprintf(x,"%s","  123");
  if (strcmp(x,y) == 0) printf("Success!n");
  return 0;

Comments are closed.