Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use math lab 3 ARRAY: CHAR ARRAY VS. STRING ARRAY (a) Define helloChar, worldChar, helloString, worldString to be 'hello', 'world', hello , world, respectively.

image text in transcribed

Please use math lab

3 ARRAY: CHAR ARRAY VS. STRING ARRAY (a) Define helloChar, worldChar, helloString, worldString to be 'hello', 'world', "hello ", "world", respectively. Concatenate the above strings as below: Use bracket to concatenate helloChar and worldChar horizontally and assign it to helloWorldChar1. Repeat this to helloString and worldString, then store the result to helloWorldStringi. Now use strcat instead of bracket (use help strcat to check out the syntax) to repeat the above. Store the results to helloWorldChar2 and helloWorldString2. (b) Use class and length to determine the types and lengths of helloWorldChar1, helloWorldChar2, helloWorldString1, helloWorldString2. Create variables with suffix Class or Length to store the corresponding results. For example, the length of helloWorldChar1 should be stored as helloWorldCharlLength

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

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions