Eslam Mohamed Eslam Mohamed - 3 months ago 7
C Question

strcpy is undefined in C

Why is strcpy is undefined in this scope?

#include <stdio.h>
#include <string.h>
struct car
{
int CarNumber;
int Model;
char factoryDesgin[20];
} HussienCar,WaeelCar;

int main()
{
HussienCar. CarNumber =18475;
HussienCar. Model=2011 ;
Strcpy(HussienCar. factoryDesgin,"BMW");
WaeelCar. CarNumber =75645;
WaeelCar. Model=2005 ;
Strcpy(WaeelCar. factoryDesgin,"KIA");
printf("%s%s",HussienCar. factoryDesgin,WaeelCar. factoryDesgin);
return 0;
}

Answer

C is case sensitive.

Strcpy should be strcpy