#C++14, 30 bytes
C++14, 30 bytes
As unnamed lambda (allowed in Python):
[](decltype('B')*c){*c='C'-2;} //'c'-2 for lowercase
//Usage:
#include <iostream>
main(){
char c;
[](decltype('B')*c){*c='C'-2;}(&c);
std::cout << c << std::endl;
}
33 bytes
Function that assigns to its parameter:
int f(decltype('B')*c){*c='C'-2;}
//Usage:
#include <iostream>
main(){
char c;
f(&c);
std::cout << c << std::endl;
}
Pretty hard to do it otherwise since no #include
, return
or auto
because of U. Modifying parameters for return values seems ok Meta