No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Can someone guide me how can I use scanf for a structure? [CODE]const int IDLEN = 30; const int POLARITYLEN = 3; const int MAXSTOCKITEMS = 10; struct TransistorRec { char manufacturersID[IDLEN]; char polarity[POLARITYLEN]; float power; float gain; int stock; }; typedef struct TransistorRec Transistor; struct StockRec{ int size; Transistor … |
|
Hi there. I've written a program to sort a few numbers. However, I get an error missing function header. Can you please guide me where did it go wrong? Thanks [CODE]// #include "stdio.h" int sort(double top, double middle, double bottom); int main() { double x[20]; x[1]=0; x[2]=-0.07; x[3]=0.08; x[4]=-0.01; printf("%.1d,%.1d",x[1],x[2]); … |