hi i want to know why is this not printf out the value
Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
struct computer_part
{
char name;
int quantity;
int price;
};
main()
{
struct computer_part cp[5];
int i;
printf("enter price");
scanf("%i",&cp[i].price);
printf("%i",cp[i].price);
getch();
}