FIT3042 Study Guide - Final Guide: Scanf Format String, C String Handling, Gnu Compiler Collection

48 views10 pages
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
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 10 pages and 3 million more documents.

Already have an account? Log in
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 10 pages and 3 million more documents.

Already have an account? Log in
Number Comparison
Output:
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 10 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers