fork download
  1. #include <stdio.h>
  2.  
  3. void set_white(unsigned char *pixel) {
  4. *((int*) pixel) = 0x00FFFFFF;
  5. }
  6.  
  7. int main(void) {
  8. // your code goes here
  9.  
  10. unsigned char pixel[] = {0, 0, 0, 255};
  11.  
  12. printf("%d\t%d\t%d\t%d\n", pixel[0], pixel[1], pixel[2], pixel[3]);
  13.  
  14. set_white(pixel);
  15.  
  16. printf("%d\t%d\t%d\t%d\n", pixel[0], pixel[1], pixel[2], pixel[3]);
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
0	0	0	255
255	255	255	0