Answered by:
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

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
-
I would ask here:
https://social.msdn.microsoft.com/Forums/en-US/home?forum=visualstudiogeneral
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages
Richard Mueller - MVP Enterprise Mobility (Identity and Access)
- Proposed as answer by Dave PatrickMVP Sunday, December 1, 2019 7:39 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, December 9, 2019 1:37 PM
Sunday, December 1, 2019 6:21 PM -
Also try asking for help over here.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Friday, December 6, 2019 3:17 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, December 9, 2019 1:37 PM
Sunday, December 1, 2019 7:39 PM -
Hello,
this is C. You should ask here: https://social.msdn.microsoft.com/Forums/en-US/home?forum=vcgeneral
By the way: you try printf page[3]. This is out of scope of page. You must printf page[i]:
printf("%c %f %d",name[i],price[i],page[i]);
- Edited by Guido Franzke Monday, December 2, 2019 7:32 AM
- Proposed as answer by Richard MuellerMVP, Banned Friday, December 6, 2019 3:17 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, December 9, 2019 1:37 PM
Monday, December 2, 2019 7:30 AM
All replies
-
This is not Small Basic. You should look for another forum dedicated to you programming language.
Jan [ WhTurner ] The Netherlands
Thursday, November 28, 2019 10:39 AM -
Also try asking for help over here.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Friday, December 6, 2019 3:17 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, December 9, 2019 1:37 PM
Sunday, December 1, 2019 7:39 PM -
Hello,
this is C. You should ask here: https://social.msdn.microsoft.com/Forums/en-US/home?forum=vcgeneral
By the way: you try printf page[3]. This is out of scope of page. You must printf page[i]:
printf("%c %f %d",name[i],price[i],page[i]);
- Edited by Guido Franzke Monday, December 2, 2019 7:32 AM
- Proposed as answer by Richard MuellerMVP, Banned Friday, December 6, 2019 3:17 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, December 9, 2019 1:37 PM
Monday, December 2, 2019 7:30 AM