Write main functions to test and debug each function using


Write main() functions to test and debug each function, using gets() and puts() for string input and output as follows:

A) To demonstrate strlen(), input your first name using gets() and use printf to print the string followed by the number of characters in the string. An input of "Ken" would print 3. Show this with 3 string input examples.

B) To demonstrate strcpy(), input your first name using gets(s1) and use strcpy() to copy it to a second string, s2 and print both strings with puts(). So an input of "Ken" would print: "string1 = Ken string2 = Ken".

C) To demonstrate strcat(), use gets() to input your first name, last name, and Red ID as three separate strings, print them out, one per line, concatenate the three strings, and then use puts() to print out Hello followed by your name and Red ID. If the three input strings entered are "Ken" "Arnold" and "876543210", then it should print:

Request for Solution File

Ask an Expert for Answer!!
Business Economics: Write main functions to test and debug each function using
Reference No:- TGS01185359

Expected delivery within 24 Hours