Search code examples
cprintingprintfillegalargumentexceptionputs

how to make output like this, using print in C


So I need to print a title using \ __ ||

it will become something like this

  ______
 |_   _ \
   | |_) |
   |  __'.
  _| |__) |
 |_______/

how to print all, and i get error even though i use \ to print \


Solution

  • I'm able to print out your image with this code:

    char* thing = "  ______\r\n |_   _ \\\r\n   | |_) |\r\n   |  __'.\r\n  _| |__) |\r\n |_______/";
    
    int main( void )
    {
        printf("%s",thing);
        return 0;
    }
    

    What you need is a string escaping tool, if you plan on escaping complex images. I used one at http://www.freeformatter.com/java-dotnet-escape.html#ad-output