Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 2 (6 marks) Given the program segments. Answer the following questions. a) string heroName1=Hang Tuah; string heroName2=Hang Jebat; i. // declare three pointer variables

image text in transcribed

QUESTION 2 (6 marks) Given the program segments. Answer the following questions. a) string heroName1="Hang Tuah"; string heroName2="Hang Jebat"; i. // declare three pointer variables named hero1, hero2 and hero3 that can store the address of string data types ii. // Assign hero1 to store address of name1 iii. // Assign hero2 to store address of name2 //By using hero3 as a temporary pointer, switch the value of hero1 and hero2 without using the variables name1 and name2 iv. V. vi

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions