Here is a declaration of a variable bulbA
and a main()
that uses it:
#include <stdio.h> struct { int watts; int lumens; } bulbA; int main() { /* set values for bulbA */ /* print values of bulbA */ return 0; }
Edit the example so that bulbA
gets 100 watts and 1710 lumens.
Note to Java programmers: The above declaration allocates memory for bulbA
.
You don't need to use new
as you might expect in
Java programming.