Question: 3. Type the following program Lab6A.C and run it. #include Hinclude #include int main(void) char name [80]; system(cls); printf(Enter your full name : ); gets

 3. Type the following program Lab6A.C and run it. #include Hinclude

3. Type the following program Lab6A.C and run it. #include Hinclude #include int main(void) char name [80]; system("cls"); printf("Enter your full name : "); gets (name); printf(" Your name is ts ", name); system("pause"); return(0); (A) For the above program, what happens if you use scanf to enter the full name? Why? 4. Modify the program Lab6A.C to print your name using a function myPrintf(). Your main function pass the string to function myPrintf(), the function prints your name the same as Lab6A.C does. Save the program as Lab6B.C. 5. Modify the program Lab6A.C to count the number of characters in the name and display both the name and the number of characters. Do not count spaces as characters. The ASCII code for a space is 3210 or as a character. The program must have two separate functions: a character counting function to count the number of characters, and a function to display both the name and the number of characters. Save the program as Lab6C.C. 6. Modify the program Lab6C.C to use the strlen function included in the string.h library rather than your character counting function. Note that the number of characters now includes spaces. Save the program as Lab6D.C

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!