Question: (6) There are 8 x 8 image pixels. The matrix of image pixels represents train head and train body as shown in Figure Q4(). The


(6) There are 8 x 8 image pixels. The matrix of image pixels represents train head and train body as shown in Figure Q4(). The matrix can be execute by declaring: int pixel [8][8]; Value 1 in each element represents black pixel and 0 represents white pixel. Figure Q4(e) ) Rewrite the declaration of image pixels by initializing it, so the result shown in Figure Q4(e). [5 marks) (1) Write a C++ statement to make all pixels white. [4 marks] Write a C++ statement(s) to make four black pixels in seventh row as shown in Figure Q4(e) to white. [4 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
