Introduction
In this lab, we will learn how to find the largest and smallest numbers among two input numbers using global declaration in C programming. Unlike local variables, global variables can be accessed and modified by any function within the program. We will use global variables to store the input numbers and solve the problem.
Note: You need to create the file
~/project/main.c
yourself to practice coding and learn how to compile and run it using gcc.
cd ~/project
## create main.c
touch main.c
## compile main.c
gcc main.c -o main
## run main
./main