Question #6174   Submitted by Answiki on 05/22/2022 at 03:25:14 PM UTC

How to display a tabulation in C?

Answer   Submitted by Answiki on 05/22/2022 at 03:26:47 PM UTC

In C, there is a special character \t that allows to define a tabulation. Here are some examples:

// The ch variable contains a tabulation
char ch='\t';

// The words in the string are separated by a tabulation
char string[]="Une \t tabulation";

// Displays 1, 2 and 3 tabulation separated
printf ("1\t2\t3");

2 events in history
Answer by Answiki on 05/22/2022 at 03:26:47 PM

In C, there is a special character \t that allows to define a tabulation. Here are some examples:

// The ch variable contains a tabulation
char ch='\t';

// The words in the string are separated by a tabulation
char string[]="Une \t tabulation";

// Displays 1, 2 and 3 tabulation separated
printf ("1\t2\t3");

Question by Answiki 05/22/2022 at 03:25:14 PM
How to display a tabulation in C?
# ID Query URL Count

Icons proudly provided by Friconix.