Question: Create a function called v_vin in C programming language that checks for the validity of a vin number. The function accepts char *check as a

Create a function called v_vin in C programming language that checks for the validity of a vin number. The function accepts char *check as a paramater and it returns an int. Vin number is 17 characters. Here are the requirement:

- If the length of the input is more than 17 the program should return -100 - If the vin is not valid then it should return 100 - If the vin is valid then it should return 200

For example, the char "2C3CCAAG2DH535679" should return 200 because it's a valid vin number.

How does vin work: https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Check_digit

Function template

int v_vin(char *check){

}

Please write the function in C programming language and show me your though process pls

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!