Smoke HHH Smoke HHH - 1 year ago 89
C Question

Printing several \t in one line

For some weird reason my little program over here doesn't show up the way I want to.The last

before Quit for a weird reason doesn't do anything.

Can anyone explain me why?

#include <stdio.h>
int n,litera;
void main (void)
{ n=1;
printf("Selectati optiunea aleasa:");

Answer Source

There's nothing really weird about it. Since Compile is more than 4 letters long, it eats up three spaces into the next tab block. Hence the result. Use two \t\t otherwise.

Here's a Q&D solution:

#include <stdio.h>
 #define TAB "    "

 int n,litera;

 int main (void)
 {   n=1;
     printf("Selectati optiunea aleasa:");
     return 0;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download