subject

Before the main function, declare a struct called Movie which has title as a string and year as the integer as the member variables. Also before the main function, instantiate an object of Movie called m with initial value "Avengers" as title and year as 2019. Note m is the global variable and A in the title is uppercase. Also before the main function, declare another global variable which is a pointer to the movie object m named ptr and make it point to m.
In the main function, output the title and the year of m to the console separated by a space so that the output is "Avengers 2019" with a new line at the end.
Next in the main function, change the value of m so that the title of m is "Shrek" and the year is 2001 by manipulating ptr only. Again you should do this not using the variable m directly but using the pointer ptr instead.
Now output the value of m again by directly using the variable m. Double check the values got changed. Again, the title and the year should be separated by a space and have a new line at the end. So the new output should be "Shrek 2001" with a new line (note that S is the uppercase)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Which component acts as a platform on which application software runs
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
question
Computers and Technology, 24.06.2019 17:30
Click on the tab on the ribbon to open the backstage view. file view insert review
Answers: 1
You know the right answer?
Before the main function, declare a struct called Movie which has title as a string and year as the...
Questions
question
Biology, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
English, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Social Studies, 14.09.2020 01:01
question
Biology, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Mathematics, 14.09.2020 01:01
question
Biology, 14.09.2020 01:01