# The Letter A without A

Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of printing) is allowed.

Both the lowercase and uppercase versions of the letter "A" are acceptable (that is, unicode U+0061 or unicode U+0041. Other character encodings that aren't Unicode are allowed, but either way, the resulting output of your code must be the latin letter "A", and not any lookalikes or homoglyphs)

You must not use any of the below characters in your code, regardless of the character encoding that you pick:

• "A", whether uppercase or lowercase.

• "U", whether lowercase or uppercase.

• X, whether uppercase or lowercase.

• +

• &

• #

• 0

• 1

• 4

• 5

• 6

• 7

• 9

Cheating, loopholes, etc, are not allowed.

Since this is , the shortest solution, in bytes, that follows all the rules, is the winner.

### Validity Checker

This Stack Snippet checks to make sure your code doesn't use the restricted characters. It might not work properly for some character encodings.

var t = prompt("Input your code.");

if (/[AaUuXx+&#0145679]/.test(t)) {
} else {
}

This Stack Snippet that makes sure you don't have a disallowed character is also available on JSFiddle.

• @ColdGolf You seem to be saying "yes" to functions, but functions don't display, they usually return.
– xnor
Aug 19 '16 at 23:06
• Is ending up with a variable that contains just a also good enough ? Aug 19 '16 at 23:17
• That's not what I meant. The supposed code doing a variable assignment would not contain any of the forbidden characters. I'm just trying to understand what is covered by "display by means other than printing". If "return from a function" is OK, what about "assign to a variable" ? Aug 20 '16 at 0:05
• Why those particular characters? Aug 22 '16 at 1:32
• @immibis A for obvious reasons. U for Unicode escape strings (\u0041 is A), X for hex escape strings (\x41), + for Unicode ordinals (U+0041), & for HTML entities, # for I actually don't know, 65 is the decimal ordinal of A, 41 is the hex ordinal of A, 97 is the decimal ordinal of a, and 0 for a few of the previous reasons.
– user45941
Aug 22 '16 at 6:26

## VBA, 12 bytes

?Chr(88-23);

in the VBA Immediate window.

• You could remove ; to make it 11 bytes Aug 20 '16 at 22:03
• @Anastasiya-Romanova秀 ...except the instructions say to avoid a linefeed if you can. Aug 21 '16 at 2:53

# Dyalog APL, 12 bytes

⊃⎕DR/88-8 23

Equivalent to 80 ⎕DR 65

## Labyrinth, 6 5 bytes

833.@

Explanation

833     # push 833 to stack
.   # print modulo 256 as byte
@  # exit

Try it online

Saved 1 byte thanks to Martin Ender.

• Actually making use of that modulo: 833.@ Aug 21 '16 at 12:57
• @MartinEnder: Brilliant! Aug 21 '16 at 17:41

## dc, 4 bytes

833P

UCHAR_MAX overflow rolls through the table six three times before landing at 65.

## Mathematica, 16 bytes

First@WordList[]

WordList[] gives a list of common English words. First takes the first element of this list, which is "a".

• Is WordList guaranteed not to change in a newer Mathematics update? Aug 22 '16 at 20:23
• @ColdGolf It doesn't matter if it's updated. As long as any version of the language (i.e. any given interpreter or compiler) correctly runs this code, the answer is valid as far as PPCG is concerned. Otherwise, no answer would be valid since we couldn't be sure that any answer would still work in any future update of any language, since the authors of those languages are free to make changes that break backwards-compatibility. Aug 22 '16 at 21:44
• @ColdGolf Wordlist is lexigraphically sorted. The only word that could come before "a" is "". Aug 24 '16 at 13:36

# Powershell v5, 1312 11 bytes

"$(!2)"[$?]

Thanks to krontogiannis for saving me a byte.

Old 12 byte solution.

"$(!$?)"[$?] Explanation: "$(!$?)"[$?]
$? #returns the status of the last command, in this case, the call to this PS file ! #false operator$(   )       #runs the code in between () even while its in between ""
"      "      #converts to string
[$?] #returns index 1 (true) of the preceding string (1 is forbidden) I don't have any earlier versions easily available to test on right now, but this should work back to v2 at least. • Take the False value using a simple constant: "$(!2)"[$?] (11 bytes) Aug 29 '16 at 13:26 • I posted this: [Convert]::ToString((8-3)*2,16) then scrolled through and was like daheck, does "$(!2)"[$?] actually work!? Oct 7 '16 at 0:39 # Cubix, 5 bytes o'@)^ Try in the online interpreter! Cubix is a language where (as the name implies) everything is executed on the faces of a cube. This code maps to the following cube: o ' @ ) ^ . The basic idea of this answer is to get a nearby character and increment it to what we need. In Cubix, @ is the exit command needed to terminate the program, but also conveniently right under 'A' in the ASCII table. This means we can use the character once to mean two different things, saving bytes - here's the order in which the code is run: • '@ pushes the character code 64 to the stack. • ) increments the top of stack, yielding the desired character. • ^ sends the instruction pointer north, wrapping around to... • o outputs the top of stack, A. • @ terminates the program. • Ha, awesome double use of @ :-) Jan 18 '17 at 15:11 # Sesos, 3 bytes The code contains two unprintable characters, so here is a hexdump: 0000000: a85a0d .Z. Try it online! (Note that this uses the assembly code, which TIO converts to the binary above as an intermediate step. The binary is shown as a debug message.) It is generated from this assembly program: add 65 put • Could you elaborate on the unprintable characters part? Aug 19 '16 at 22:55 • @ColdGolf Binary Sesos isn't a character based language; it stores its source code in form of a little-endian base-256 integer. Aug 19 '16 at 23:12 • Hmm... I'd say the assembly code is the source code of that program and it uses "a" and "6", which are forbidden. Otherwise everybody might just compile their program to an x86 binary and voilà, no forbidden characters used! Aug 19 '16 at 23:40 • @YetiCGN Submitting binary programs is perfectly acceptable. Aug 21 '16 at 6:39 • @YetiCGN TIO doesn't support binaries right now. I've added a note to the link. Aug 21 '16 at 22:09 # Pure Bash, 23 r=({Y..b}) echo${r[8]}

Creates this array and displays the 8th member:

Y Z [  ] ^ _  a b

# Java 9 jshell, 18 bytes

printf("%c",'C'-2)

jshell is a Java REPL that comes with Java 9.

# Brachylog, 7 bytes

@P:33mw

Try it online!

### Explanation

@P is the following string:

!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~ (the first character is a space) And its 33rd element is the required letter A. @P:33mw @P generate the string above :33 append the number 33, yielding ["...",33] m pass the array as Input of m, and the required character becomes the Output w recycles the right argument of the previous predicate as the left argument, and then prints to STDOUT # dc, 8 7 bytes -1B thanks to Dennis 88 23-P Pushes 88, pushes 23, subtracts, leaving 65. Print top of stack (65) as an ASCII string, sans trailing newline. Edit: These are a few of the other ways I came up with. It basically became a game of "generate the numbers 65 and 97 using only [238B-F] and without addition". Ironically, I find the longest ones most interesting. _Fdd/r-oC 2-n # involves changing the base 2_2/8d*3*2/-P Idd2/2/-2*on # also changes base 2d8r^r_2/-P 8d*2_2/-P B 3d**2-P 33 3*2-P ## Retina, 8 bytes M TOL Try it online! ### Explanation M This counts the number of matches of the empty regex in the empty input, so it produces a 1. TOL This is a transliteration which substitutes characters from the first set with corresponding characters from the second set. However, O and L are shorthands which expand to the odd digits and the upper case alphabet, respectively, so this replaces the 1 with A. ## Commodore 64 BASIC, 6 bytes 2?"♠" There's a non-printing character after the first quotation mark, with byte value 14. How this works: The Commodore 64 has two character sets: "shifted mode" (which contains the full upper- and lower-case alphabet, and the startup "unshifted mode", which contains the upper-case alphabet and a selection of symbols. The "spade" symbol in unshifted mode has the same byte value as uppercase "A" in shifted mode, so if you switch modes before printing out a "♠", you get the letter "A" instead. The question now becomes: what's the most efficient way of switching modes? The "approved" method is POKE 53272,23, but that's rather long for code golf. There's a control character (byte value 14) that switches to shifted mode, but you can't type it in directly, and ?CHR$(14) is still rather long. Further, both of these contain disallowed characters, and working around that would expand them quite a bit.

You can cut it down to a single byte, though, by combining it with the code to print out the "A". The Commodore has no memory protection, so after typing in a proxy program (I used 2?"Q♠"), you can modify the in-memory representation to replace the "Q" with byte value 14. For a freshly-started C64, POKE 2055,14 will do the job.

# R 3.2.2, 34 32 bytes

This is a tricky challenge in R, since the only function that will print without quotes and junk is cat, which contains an "a". We have to get it by indirect means. In a fresh R installation with no extra packages, the base package (in which cat resides) is the eighth in the search list (luckily 8 isn't prohibited!)

cat is the 297th thing in the base package, but 9 and 7 are prohibited. I think 322-23-2 is the most efficient way to calculate 297, but I may be wrong!

(Edit: I was wrong. Thanks to Albert Masclans for pointing out that 33*3*3 is more efficient. I also added the R version number since later versions of R will probably introduce more things into the base package.)

"a" is held in the first element of letters (alternatively, use LETTERS if you want "A") but since 1 is prohibited, we use 3-2 to get it.

get(ls(8)[33*3*3])(letters[3-2])
• I love how you did it. 297 = 3*3*33 Aug 30 '16 at 10:55

# Vim, 6 bytes

grNg??

Challenge doesn't block N, and Vim has a ROT-13 feature. FDinoff's answer is probably cooler, but this is ASCII and works everywhere.

# Vim, 19 bytes (not competing)

:redi@"|Ni!<CR>pJd3w~D

Do you demand a shrubbery?

# Octave, 1311 8 bytes

Didn't expect to golf this answer down, but wohoo, a bug(?) in Octave made it possible to save two bytes! :) Converting this to a "full program", instead of a function saves an additional three bytes, leaving us with 8 bytes:

['',833]

['',833] concatenates the empty string with the number 883. The ASCII code for A is 65, so 883 might seem a bit odd. I think this must be a bug, but what Octave does when concatenating an empty string and a number is that it takes the number modulus 256. mod(883, 256) == 65 which just so happens to be the ASCII code for A.

Octave does not do this when using the "proper" method, char(883), in which case we will get:

warning: range error for conversion to character value

# R, 11 bytes

el(LETTERS)

el(LETTERS) is equivalent to LETTERS[[1]].

Try it online!

# Groovy, 9 bytes

f={--'B'}

Try it online!

## Previous solution

I missed the fact that a return value was an acceptable alternative to printing the result.

# Groovy, 12 bytes

print(--'B')

## Bash, 14 13 bytes

tr PQ @-B<<<Q

Output:

A
• 13 bytes: tr QQ @-B<<<Q Nov 7 '20 at 18:54
• @pxeger Nice find! The last char in SET2 will be ignored, which is fine, we need the first 2 chars only for this to work. Thanks. Nov 8 '20 at 12:34

# Jolf, 3 bytes

Fpl

Try it here!

First (F) of the lowercase alphabet (pl).

Are you tired of verifying your code manually? Use this!

Another one for three bytes:

~TS

This is the hexadecimal char code of a newline (0x0A)

# Dyalog APL, 15 bytes

{⍵::2⌷⊃⎕DM⋄⍺}⍴⍬

The straightforward options are all banned: both ⎕AV (APL character set vector) and ⎕UCS (Unicode conversion) contain banned characters.

It gives one uppercase A:

{⍵::2⌷⊃⎕DM⋄⍺}⍴⍬
A

Explanation:

• {...}⍴⍬: pass 0 (length of empty vector) into the function
• ⍵::: trap the error with code , which will be 0. A trap on 0 means to trap all errors.
• 2⌷⊃⎕DM: the 2nd character of the first line of the error message
• ⋄⍺: try to return the value of the left argument. There isn't one, so this will raise a VALUE ERROR, which the A is then extracted from.

# Ruby, 17 bytes

print (88-23).chr

Thanks to Dennis for the expression, a big improvement over 23*8/2-3*8-3, my first idea.

• You can replace print with $><< for -2 bytes. Aug 20 '16 at 7:01 • (88-23).chr""<<88-23. Sadly when you combine it with$><< as suggested by @Jordan, you have to make sure the second << gets evaluated first. Fortunately that can be solved without enclosing it in parenthesis: just use the first << as method, not as operator: $>.<<""<<88-23. Aug 20 '16 at 18:17 # Lua, 36 bytes _,_,y=type{}:find(".(.)")io.write(y) Explanation: • type{} is equivalent to type({}) and returns the string "table" with the desired 'a'. • string.find's very infrequently-used 3rd return value is the first capture from the pattern. Most of the other ways that could be used to chop up a string are forbidden by the alphabet restrcitions. Comments: Alternatively, print for -3 bytes if not required to suppress the trailing newline. I really wanted to use _VERSION to get the 'a', but type{} is shorter. This should work in Lua 5.1-5.3. Lua 5.0 doesn't support the string metatable, so it is a bit longer. • _,_,z=type{}:find".(.)"print(z) 31 bytes Aug 27 '16 at 13:24 ## Pyke, 2 bytes Gh Try it here! Gh - alphabet[0] # reticular, 9 bytes "C"c2-co; Try it online! This is basically C converted from a char to a char code, subtracting two, converting back to a char, printing it with o, then finally terminating it with ;. # Bash, 19 17 bytes Prints lower-case a: printf \\$[282/2]

(Thanks to Dennis for reminding me of the deprecated syntax)

# Fission, 5 bytes

R'B_O

Try it online!

### How it works

R      Spawn an atom that moves to the right.
'B    Set the atom's mass to 'B'.
_   Decrement the atom's mass.
O  Print the character that corresponds to the atoms mass and destroy the atom.

# PHP, 12 bytes

<?=chr(833);

Due to an overflow the above produces an 'A' (see example 2 of the PHP doc).