Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i wrote this program and im wondering whats the error in it i want it to check the length and the validity of the telephone
i wrote this program and im wondering whats the error in it i want it to check the length and the validity of the telephone number but when i try to put an input lets say i put 4743838abfc it still says valid number for the output which is wrong so what should i modify in order for it to work properly passing the input should be by argc and argv i cannot using anything else
please neglect the first photo it was by mistake the program is the second
000 W ES n.c X *validcheckc.c X validcheckch X 3 #include "validcheckc.h" 4 Fint qlc (char *str[]) { 5 6 if (str !=NULL && str[1]=='\0'){ 7 tele_val (str); 8 printf ("valid argument "); 9 } 10 return 0; 11 L} 12 Fint tele_val (char numb []) { 13 int i=0; 14 int count; 15 char *p=&numb[1]; 16 17 18 while(* (p++) != '\0') { 19 printf ("length is $d ", count); 20 count ++; 21 22 lif (numb[i]='0' && numb[i] #include Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started