This repository contains a simple C program that demonstrates the use of structures to represent a robot with a name and Speed and Position, and update the position with respect to time.
-
Update Function: The
update_robot_state
function now takes aRobot
struct by value (instead of using a pointer). It updates the robot's position and returns the updated Robot. -
Main Function: The
myRobot
instance is updated by assigning it the value returned byupdate_robot_state
after each time interval.