General discussion

Locked

pointer and array

By rnsbanez ·
hi, im father of 2nd yr hs girlhere in the Philippines. she has an assignment in her computer subject about pointers and array in c programming, which i dont know a a bit of it.. her dead line would be on wednesday Philippine time. i wish you could help her. thanks a lot..
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

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums