On my Linux box it shows up as ^A
, CTRL-A
when i vi
the file. While writing a C program, how should i reference it? How can i find out a numeric value of it?
Asked
Active
Viewed 261 times
1

James Raitsev
- 92,517
- 154
- 335
- 470
2 Answers
5
Control characters are 0x40 less than their character. A
is 65
, so ^A
is 1
.

Ignacio Vazquez-Abrams
- 776,304
- 153
- 1,341
- 1,358
-
1Actually, it’s not minus 0x40, but xor: consider ^? as DEL. – tchrist Apr 24 '11 at 22:52
0
This should help?
http://www.robelle.com/smugbook/ascii.html
Otherwise, you could always just read in the file and output that particular char as a value to see what it is.

Brian Roach
- 76,169
- 12
- 136
- 161