#include <stdio.h>
#define TAM 3
void preencher(char *str, char letra) {
for (int c = 0; c < TAM - 1; c++) str[c] = letra;
str[TAM - 1] = 0;
}
int main(){
char str[TAM], letra;
preencher(str, letra);
}
//https://pt.stackoverflow.com/q/317828/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgVEFNIDMKCnZvaWQgcHJlZW5jaGVyKGNoYXIgKnN0ciwgY2hhciBsZXRyYSkgewogICAgZm9yIChpbnQgYyA9IDA7IGMgPCBUQU0gLSAxOyBjKyspIHN0cltjXSA9IGxldHJhOwogICAgc3RyW1RBTSAtIDFdID0gMDsKICAgIHByaW50ZigiJXMiLCBzdHIpOwp9CgppbnQgbWFpbigpewogICAgY2hhciBzdHJbVEFNXSwgbGV0cmE7CiAgICBzY2FuZigiJWMiLCAmbGV0cmEpOwogICAgcHJlZW5jaGVyKHN0ciwgbGV0cmEpOwp9CgovL2h0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8zMTc4MjgvMTAx