{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

test1 - CSE2031 Page1of3 LABTEST1...

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

View Full Document Right Arrow Icon
CSE 2031 Page 1 of 3 LAB TEST 1 Complete and submit the following two programs. Each is worth 50% of the total grade. Problem A A.1 Specification A palindrome is a word or string that can be read the same way forward and backward. A few examples are “mom”, “dad”, “ABBA”, “123454321”, “abc-cba”, “/* y-arra-y */” , etc. Write a C program that contains two functions, one to input a non empty string and the other to determine whether the input line of characters is a palindrome. A.2 Implementation The program is named palin.c . Use the given template palin.c and fill in your code. The first function to be implemented is myStrInput() . See file palin.c for its specification. Use getchar and a loop to read a line of characters, and store the input characters into the array. The loop terminates when a new line character ‘ \n ’ is entered. The new line character ‘ \n ’ is NOT part of the line (i.e., discard the new line character ‘ \n ’).
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