After a long time I am writing a C program. While writing the program I had to use formfeed and vertical tab. so I used \f and \v in program.
But while running the code instead of Formfeed and vertical tab I can see symbols of male and female. I don't know why it is not working.
Below is my code sample :
#include<stdio.h>
#include<conio.h>
void main()
{
printf("I am \f SpiderCode\n");
printf("I am \v SpiderCode\n");
getch();
}
[Note: I am using visual studio 2013 for above code]
Output of the above code
This has nothing to do with your code, this is an issue with the display driver for the output of the program. The console does not recognise the '\f' and '\v' codes, so it just displays the corresponding characters instead. The '\f' maps to a character with a value 12 and '\v' to 11.
In the old days, you'd have something like ANSI.SYS running which would identify special codes and update the console, such as changing the colour, moving the cursor, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With