#include <stdio.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
void limpa () {
fflush(stdin
); //isso não serve pra nada aqui }
int main() {
setlocale(LC_ALL
,"Portuguese"); //nesse código isso é disponsável int inteiro = 1, *i;
float flutua = 1.0;
float* f;
char texto[20] = "Hello";
char t[3]; //deveria declarar e atribuir junto
i = &inteiro; *i = 2; //isso não faz sentido
f = &flutua; *f = 2.0; //idem
limpa();
strcpy(t
, texto
); strcpy(t
, "Oi"); //para copiar uma string para outra tem que usar strcpy() printf("Os valores são %i, %.2f, %s.\n", *i
, *f
, t
); //variável que já é ponteiro passa direto }
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxsb2NhbGUuaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+Cgp2b2lkIGxpbXBhICgpIHsKICAgIGZmbHVzaChzdGRpbik7IC8vaXNzbyBuw6NvIHNlcnZlIHByYSBuYWRhIGFxdWkKfQoKaW50IG1haW4oKSB7CglzZXRsb2NhbGUoTENfQUxMLCJQb3J0dWd1ZXNlIik7IC8vbmVzc2UgY8OzZGlnbyBpc3NvIMOpIGRpc3BvbnPDoXZlbAogICAgaW50IGludGVpcm8gPSAxLCAqaTsKICAgIGZsb2F0IGZsdXR1YSA9IDEuMDsKICAgIGZsb2F0KiBmOwogICAgY2hhciB0ZXh0b1syMF0gPSAiSGVsbG8iOwogICAgY2hhciB0WzNdOyAvL2RldmVyaWEgZGVjbGFyYXIgZSBhdHJpYnVpciBqdW50bwogICAgaSA9ICZpbnRlaXJvOyAqaSA9IDI7IC8vaXNzbyBuw6NvIGZheiBzZW50aWRvCiAgICBmID0gJmZsdXR1YTsgKmYgPSAyLjA7IC8vaWRlbQogICAgbGltcGEoKTsKICAgIHN0cmNweSh0LCB0ZXh0byk7IHN0cmNweSh0LCAiT2kiKTsgLy9wYXJhIGNvcGlhciB1bWEgc3RyaW5nIHBhcmEgb3V0cmEgdGVtIHF1ZSB1c2FyIHN0cmNweSgpCiAgICBwcmludGYoIk9zIHZhbG9yZXMgc8OjbyAlaSwgJS4yZiwgJXMuXG4iLCAqaSwgKmYsIHQpOyAvL3ZhcmnDoXZlbCBxdWUgasOhIMOpIHBvbnRlaXJvIHBhc3NhIGRpcmV0bwp9