почему он не принимает третье значение, что b3.name = getchar (); - PullRequest
0 голосов
/ 25 октября 2019
#include<stdio.h>
struct Books
{
    char name;
};
int main()
{
    struct Books b1;
    struct Books b2;
    struct Books b3;
    b1.name = getchar();
    printf("%c\n",b1.name);
    b2.name = getchar();
    printf("%c\n",b2.name);
    b3.name = getchar();
    printf("%c\n",b3.name);
    return 0;

 }

/ * "почему он не принимает третье значение b3.name = getchar (); но он отлично работает с int и float."

ahindra @ ahindra: ~ / Documents / c_c ++ $ gcc test.c -o проверить ahindra @ ahindra: ~ / Documents / c_c ++ $ ./test ff

jj ahindra @ ahindra: ~ /Документы / c_c ++ $

* /

...