none
see output,why this is happening? here is output : entet names, prices and no. of pages of 3 books: a 2.0 7 b 5.9 8 and this whaatyou entered a 2.000000 1073741824 0.000000 1073741824b 5.900000 1073741824 RRS feed

  • Question

  • #include<stdio.h>
    #include<conio.h>
    int main()
    {
        char name[3];
        float price[3];
        int page[3];
        int i;
        printf("entet names, prices and no. of pages of 3 books:\n");
        for(i=0;i<=2;i++)
        {
            scanf("%c %f %d",&name[i],&price[i],&page[i]);
        }
        printf("and this is what you entered\n");
        for(i=0;i<=2;i++)
        {
            printf("%c %f %d",name[i],price[i],page[3]);
        }
        getch();
        return 0;
    }

    • Edited by krishnasu1 Thursday, November 28, 2019 5:07 AM
    • Moved by litdev Saturday, November 30, 2019 2:57 PM
    Thursday, November 28, 2019 5:02 AM

Answers

All replies