Find Largest and Smallest Numbers Using Global Variables

# 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. ```bash cd ~/project # create main.c touch main.c # compile main.c gcc main.c -o main # run main ./main ```

|60 : 00

Click the virtual machine below to start practicing