Question: Please write a canvas.c file in C unit that passes all 6 tests in canvastest.c while using the function signatures in canvas.h canvas.h: #ifndef CANVAS

Please write a canvas.c file in C unit that passes all 6 tests in canvastest.c while using the function signatures in canvas.h
canvas.h:
#ifndef CANVAS
#define CANVAS
#include "../tuple/tuple.h"
/* canvas related API */
typedef struct canvas {
unsigned int channels;
unsigned int width;
unsigned int height;
unsigned int* pixels;
} Canvas;
Canvas canvas(unsigned int, unsigned int);
Canvas write_pixel(Canvas, unsigned int, unsigned int, Color);
Color pixel_at(Canvas, unsigned int, unsigned int);
char* canvas_to_ppm(Canvas);
#endif
Please write a canvas.c file in C unit that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!