Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Consider a text file. Each line of the file has the following form: firstName lastName An example of the file, with name example.txt, is

image text in transcribed

1. Consider a text file. Each line of the file has the following form: firstName lastName An example of the file, with name example.txt, is Allen Turing John McCarthy Dennis Ritchie Brian Kernighan Your program will ask a user to provide a name of a file with the format above. Your program print to the screen the full name whose last name is the greatest in dictionary order. One example execution of your program is Please input the file name: example.txt The full name whose last name is the greatest in the file is Allen Turing. You can assume NO two last names are the same in the file. (You are welcome not to use the assumption. Without that assumption, it will be more challenging and you need to give your tie breaker criteria when two full names share the same greatest last name When you compare two strings, DO NOT use the library function. Use the following one: Function name: compareS input character pointers: s 1, s2 (i.e., const char *si, const char *s2) output 0: the string in s1 is the same as that in s2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

Explain how to build high-performance service delivery teams.

Answered: 1 week ago