This repository contains a simple C program that demonstrates the use of structures to represent a robot with a name and battery level.
- Structure Definition:
- The program defines a
struct
namedRobot
that has two members:char name[20]
: An array of characters to store the robot's name.int batteryLevel
: An integer to store the robot's battery level as a percentage.
- Main Function:
- A variable
robo1
of typestruct Robot
is created and initialized with the name"Robo1"
and a battery level of100%
. - The program then prints the robot's name and battery level to the console.