Checking that submission compiles
Submission compiles correctly
Run tests
starting test 1 ... completed
starting test 2 ... completed
starting test 3 ...
These lines differ at the point marked below
==>Enter barcode : - Invalid barcode
==>Enter barcode : 9 300605 013728 - Invalid barcode
^
TEST FAILURE
Test command : cat /home/rheise/dspp/test3.dat | ./a.out
Your test result
Enter barcode : 9 300605 013728 - Invalid barcode
Enter barcode : - Invalid barcode
Enter barcode : 9 300605 013728 - Invalid barcode
Enter barcode : - Invalid barcode
Enter barcode : 9_300605_013728 - Invalid barcode
Enter barcode : 9310720020105 - Invalid barcode
Enter barcode : 9 310720 020l05 - Invalid barcode
Enter barcode : 9 300605 013728 - Valid barcode
Enter barcode : 123 456 - Invalid barcode
Enter barcode :
Expected result
Enter barcode : 9 300605 013728 - Invalid barcode
Enter barcode : 9 300605 013728 - Invalid barcode
Enter barcode : 9_300605_013728 - Invalid barcode
Enter barcode : 9310720020105 - Invalid barcode
Enter barcode : 9 310720 020l05 - Invalid barcode
Enter barcode : 9 300605 013728 - Valid barcode
Enter barcode : 123 456 - Invalid barcode
Enter barcode :
completed
starting test 4 ...
These lines differ at the point marked below
==>Enter barcode : ihfdsfdsndsvljfd - Invalid barcode
==>Enter barcode : 9 310720 020105 - Valid barcode
^
TEST FAILURE
Test command : cat /home/rheise/dspp/test4.dat | ./a.out
Your test result
Enter barcode : fddsfhdsfweqrfds - Invalid barcode
Enter barcode : ihfdsfdsndsvljfd - Invalid barcode
Enter barcode : spln;o;lvdkmfdsp - Invalid barcode
Enter barcode : o - Invalid barcode
Enter barcode : 9 310720 020105 - Valid barcode
Enter barcode :
Expected result
Enter barcode : fddsfhdsfweqrfds - Invalid barcode
Enter barcode : 9 310720 020105 - Valid barcode
Enter barcode :
completed
Test score = 4 out of 8
Make sure your output EXACTLY matches the expected output
Run code feedback programs
45. if ((index!=1) && (index!=8) && ((barcode[index]<'0') || (barcode[index] > '9')))
==> The previous line is greater than 80 characters in length
The previous lines in assign1.c are unacceptable
==> Your main function contains a loop construct.
In this subject, loops in the main function are not
allowed in order to promote better top-down design.
==> Your main function contains a scanf call.
In this subject, scanf in the main function is not
allowed in order to promote better top-down design.
int main()
{
==> This function has over 60 lines.
You need to split it into smaller functions
==> Your program only contains the main function
Your program must be split into appropriate functions.
==> At least one function in your code must use 'call by reference'.
You do not appear to have done this in your program.
The previous lines in assign1.c are unacceptable