3 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

## C 54 bytes

char*strchr();char c(char*s){return*(strchr(s,35)+1);}


## C++ 58 bytes

#include<cstring>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.

Edit: Thanks to RayRay for pointing out some differences in C and C++ and where I could save characters <3.

## C 54 bytes

char*strchr();char c(char*s){return*(strchr(s,35)+1);}


## C++ 58 bytes

#include<cstring>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.

Edit: Thanks to Ray for pointing out some differences in C and C++ and where I could save characters <3.

## C 54 bytes

char*strchr();char c(char*s){return*(strchr(s,35)+1);}


## C++ 58 bytes

#include<cstring>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.

Edit: Thanks to Ray for pointing out some differences in C and C++ and where I could save characters <3.

2 Split C and C++ into separate submissions. Also thanked a dude called Ray.

## C/ 54 bytes

char*strchr();char c(char*s){return*(strchr(s,35)+1);}


## C++, 59 58 bytes

#include<string.h>#include<cstring>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.

Edit: Thanks to Ray for pointing out some differences in C and C++ and where I could save characters <3.

## C/C++, 59 bytes

#include<string.h>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.

## C 54 bytes

char*strchr();char c(char*s){return*(strchr(s,35)+1);}


## C++ 58 bytes

#include<cstring>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.

Edit: Thanks to Ray for pointing out some differences in C and C++ and where I could save characters <3.

1

## C/C++, 59 bytes

#include<string.h>
char c(char*s){return*(strchr(s,35)+1);}


Since OP specified it can be a "program/function" I elected to write a function to save characters. However, I still included the "#include" statement and accompanying line break in the character count as they are required to compile the function.

Output

Returns a space " " character to indicate left, or a hash "#" character to indicate right.

Explanation

The strchr() function walks a given string and returns a pointer to the first occurrence of a specified character. It has an overload which accepts an integer as the second argument as opposed to a char which saves me 1 character. E.g. '#' can be replaced with 35. I then add one to the pointer returned from the function to get the character immediately following, and dereference it, then return the resulting char.

Note

I would also like to take this opportunity to formally express my annoyance at Visual Studio auto-formatting my code when I'm trying to golf (╯°□°）╯︵ ┻━┻.