{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Prog5 - CSc 252 Program 5 Version 1.0 Program 5 Alpha and...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSc 252 Program 5 Version 1.0 1 of 2 Program 5: Alpha and Nonalpha Program due: Thursday, December 1st, 11:59p.m. For this assignment, you will write two functions: alpha and nonalpha . Function alpha : The alpha function will take two arguments. $a0 will contain the address of the first character of a string of characters. $a1 will contain an integer that is the number of characters in the string that $a0 points to. The value in $a1 will be an accurate count of every character including the nul character that marks the end of the string. A nul character is considered neither an alphabetic character nor a non-alphabetic character. The alpha function will create a new string that contains only the alphabetic characters from the original string. To do this, alpha will need to create a local array of characters on its own stack. This is similar to the array of integers used on Program #4. There are two differences. First, the array of integers in Program #4 was always the same size. Here, the array will need to be sized to hold the number of characters in each string. Second, the array this time may need to be expanded to be a size divisible by 4 . This is necessary to insure that functions further down on
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern