Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# program coding 2 # include 3 # include 4 # include 5 # include 6 7 8 int get_date(char *st); 9 int get_date_sscanf (char

image text in transcribedC# program coding

2 # include 3 # include 4 # include 5 # include 6 7 8 int get_date(char *st); 9 int get_date_sscanf (char *st); 10 int get_date_dtend (char *st); 11 12 13 int main(int argc, char *argv[]) { 14 15 char *st1 = "asdrtgkl knbvhgfk2021udfhg (blgfdl) fdg11k"; 16 char *st2 = "DTEND:202101021123000"; 17 char *st3 = "RRULE:FREQ=WEEKLY;WKST=MO; UNTIL=202103017235959;BYDAY=SA" ; 18 19 int numl = get_date (sti): 20 printf("number found. %d ", numl): 21 int num2 = get_date_sscanf(st1); 22 printf ("number found. %d ", num2); 23 int num3 get_date_dtend (st1); 24 printf ("number found. %d ", num3): 25 printf(" "); 26 27 numl = get_date (st2); 28 printf("number found. %d ", numi); 29 num2 = get_date_sscanf (st2); 30 printf ("number found. %d ", num2); 31 num3 = get_date_dtend (st2); 32 printf("number found. %d ", num3); 33 printf(" - "); 34 35 numl = get_date (st3); 36 printf(number found. %d ", numl); 37 num2 = get_date_sscanf(st3); 38 printf("number found. %d ", num2); 39 num3 = get_date_dtend (st3) ; 40 printf ("number found. %d ", num3); 41 ) 42 43 // COMPLETE IMPLEMENTATION OF FUNCTIONS BELOW. 44 45 int get_date(char *st) { 46 // Indexes through st, char by char, until it 47 // encounters the first digit, and proceeds from there. 48 49) 50 51 int get_date_sscanf (char *st) { 52 // Uses the sscanf function to find date in st. 53 54 ) 55 56 int get_date_dtend (char *st) { 57 7/ Use direct memory access and pointer arithmetic to find the date in st 58 59 } 2 # include 3 # include 4 # include 5 # include 6 7 8 int get_date(char *st); 9 int get_date_sscanf (char *st); 10 int get_date_dtend (char *st); 11 12 13 int main(int argc, char *argv[]) { 14 15 char *st1 = "asdrtgkl knbvhgfk2021udfhg (blgfdl) fdg11k"; 16 char *st2 = "DTEND:202101021123000"; 17 char *st3 = "RRULE:FREQ=WEEKLY;WKST=MO; UNTIL=202103017235959;BYDAY=SA" ; 18 19 int numl = get_date (sti): 20 printf("number found. %d ", numl): 21 int num2 = get_date_sscanf(st1); 22 printf ("number found. %d ", num2); 23 int num3 get_date_dtend (st1); 24 printf ("number found. %d ", num3): 25 printf(" "); 26 27 numl = get_date (st2); 28 printf("number found. %d ", numi); 29 num2 = get_date_sscanf (st2); 30 printf ("number found. %d ", num2); 31 num3 = get_date_dtend (st2); 32 printf("number found. %d ", num3); 33 printf(" - "); 34 35 numl = get_date (st3); 36 printf(number found. %d ", numl); 37 num2 = get_date_sscanf(st3); 38 printf("number found. %d ", num2); 39 num3 = get_date_dtend (st3) ; 40 printf ("number found. %d ", num3); 41 ) 42 43 // COMPLETE IMPLEMENTATION OF FUNCTIONS BELOW. 44 45 int get_date(char *st) { 46 // Indexes through st, char by char, until it 47 // encounters the first digit, and proceeds from there. 48 49) 50 51 int get_date_sscanf (char *st) { 52 // Uses the sscanf function to find date in st. 53 54 ) 55 56 int get_date_dtend (char *st) { 57 7/ Use direct memory access and pointer arithmetic to find the date in st 58 59 }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions