FIT3042 Study Guide - Final Guide: Scanf Format String, C String Handling, Gnu Compiler Collection
C Programming
How to compile & run a C program
gcc -o nameToRun filename.c
./nameToRun
String Comparison
#include <string.h>
strcmp( const char *s1, const char *s2);
s1 and s2 : an array
Return: int
●0 : s1 and s2 are equal
●-x : the stopping character in s1 < the stopping character in s2
●+x : the stopping character in s1 > the stopping character in s2
Number Comparison
Output: