Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 1 ) This task will get you used to using strings. Start by creating the String Hello as an array of characters terminated by

Q1) This task will get you used to using strings.
Start by creating the String "Hello" as an array of characters terminated by the null character '\0'.
Print the string to the terminal with a label Char[]: to show how you made this string.
Next make a 2nd identical String but directly as "Hello" and print it with the label String:
Prompt the user by printing "Tell me your name Human."
Then, use fgets with the %s placeholder to get a user's name as input.
Make your name have a limit of >5 characters (array size is >6) in your declaration and fgets input.
To make your output match for checking, just use "Human" as your name.
Take note of how this results in an extra return being added (keep it).
Your normal output will look like this:
Char[]: Hello
String: Hello
Tell me your name Human.
Human
Hello Human

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

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions

Question

Show that (A 1 ) 1 = A for: A = 4 [3 3 2

Answered: 1 week ago

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago

Question

1. Understand how verbal and nonverbal communication differ.

Answered: 1 week ago