开发者

check condition for DOB in C

开发者 https://www.devze.com 2023-02-05 01:25 出处:网络
How can we check that the DOB, which is t开发者_运维知识库he user input is in correct form DD/MM/YY through C code? Also how will we restrict DOB to 6 characters only and if these two conditions are n

How can we check that the DOB, which is t开发者_运维知识库he user input is in correct form DD/MM/YY through C code? Also how will we restrict DOB to 6 characters only and if these two conditions are not fulfilled it should give an error statement. Ex - if the user i/p as DOB is 25/24/23334, it should give an error like - it's not in proper format as well as the month range is exceeding.


How about sscanf()?

0

精彩评论

暂无评论...
验证码 换一张
取 消