I want to read 4 char from a file and then store them at an array so i do:
fread (&i_r_quan, sizeof (char), 4, f_ptr);
After checking these characters I need to store them in a structure as an integer.
Does the following work by type conversion or do I have to type cast i_r_quan to an integer first:
strcpy (i_r_quantity, i_r_quan );
Also will a null be added to i_r_quan automatically when I read 4 characters into the array?: