Before you begin, be sure to review the lecture slides on the topics of structures and linked lists and review the Starter Code

computer science

Description

Introduction

Before you begin, be sure to review the lecture slides on the topics of structures and linked lists and review the Starter Code

Comparing Two Strings

In one of the programs to write for this homework, you will need to compare two strings to see whether they are identical. While this can be done by comparing character-by-character, a more convenient way is to call a C standard function named strcmp(), which performs exactly such character-by-character comparison. The prototype of this standard function is shown below.

int strcmp(const char *s1, const char *s2);

The strcmp() function compares the lexicographical order between two strings, *s1 and *s2. The return value is determined as follows.

•return negative integer if *s1 < *s2

•return positive integer  if *s1 > *s2

•return 0 if *s1 and *s2 are identical

Instruction Files
sortsum.h
187.0 Bytes
main1.c
1.3 KB

Related Questions in computer science category