General discussion
Thread display: Collapse - |
All Comments
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
pointer and array
here is the problem..
a bitmap image, respectively by 1s and 0s on the sqquare grid, maybe compressed using a process known as run length encoding. Run lenght encoding works by representing successive runs of 1s or 0s with the number indicating how many consecutives 1s or 0s there were in particular.
For continous streams of bits longer than 1, write the output in the form n:b where n is the number of bits and the continous stream and b is the bitcode value. all the bits with run length of 1 should be written as is. you may use arrays or pointers.
INPUT
the size of the bitmap in rows and columns. Have a cursor automatically move from position to position on the bitmap and prompt the user for a 0 or 1 value for that place. Maximum no. of rows and columns are 10 min if 5.
OUTPUT
The compressed output in run length encoding form.
example given:
rows: 5
columns: 5
11110
11101
11011
11001
10011