Purchase Solution

C program to extract month and day from input date string

Not what you're looking for?

Ask Custom Question

Write a C program that accepts a month and day (for example, June 14) from the keyboard as input. Store this information in a string called date. Call a function named separate() passing in the string date and the addresses of a tempmonth array and tempday integer. The separate() function should extract the two values from the passed string and store them into the passed variable addresses. Back in main, print the data in tempmonth and tempday.

Purchase this Solution

Solution Summary

Attached program makes use of sscanf function to separate the month and day from user entered string, however solution also suggests some more ways to achieve the goal.

Solution Preview

Please find attached a solution (419991.c) that makes use of sscanf function to separate the month and day from user entered string. Separation can be done in many different ways; since ...

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Javscript Basics

Quiz on basics of javascript programming language.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.