What will be the output of the following programs:
#include <stdio.h>
int main()
{
printf("ab\tab\tab\ba");
return 0;
}
What will be the output of the following programs:
#include <stdio.h>
int main()
{
printf("ab\tab\tab\ba");
return 0;
}
The result would be ab ab aa
.
This is because the string contains certain characters("ab \t ab \t ab \b a") that the program will detect. \t
(This is tab, It will usually add four spaces in its spot) and \b
( means backspace, so it will delete the previous character in the string).