Question: 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

 QUESTION 2 (6 marks) Given the program segments. Answer the following

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

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!