Write a c program that recursively determines

Assignment Help C/C++ Programming
Reference no: EM13499394

At the conclusion of this programming assignment, participants should be able to:

*       Analyze a basic set of requirements for a problem

*       Compose C language programs

*       Compile a program using Microsoft Visual Studio 2012

*       Execute a program

*       Create basic test cases for a program

*       Apply arrays, strings, and pointers

*       Summarize differences between array notation and pointer notation

*       Apply pointer arithmetic

*       Apply basic string handling library functions 

II. Prerequisites: 

Before starting this programming assignment, participants should be able to:

*       Access Microsoft Visual Studio 2012 Integrated Development Environment (IDE)

*       Design and develop a small or medium sized program in any language

*       Apply sequential, conditional, and iterative constructs

*       Design and implement user-defined functions

 

III. Overview & Requirements: 

For each of the following problems create a separate Microsoft VS 2012 project. Within each project you must have at least one header file (.h) and two source files (.c). Before you turn in this assignment, be sure to place each project folder into a single <your last name>_pa1 folder. 

1. Write a C program that sorts strings into descending or ascending order (determined by the user of the program). For this program you must declare an array of pointers to the strings, and perform the sorting without using strcpy ( ). Hence, you must manipulate the pointers to the strings only! Below is a pseudocode algorithm for bubble sort: 

1.      get values for n and the n list items (n represents the number of records in the file, list is an array of records)

2.      set the marker U for the unsorted section at the end of the list (U is an integer index value)

3.      while the unsorted section has more than one element do steps 4 through 8

4.            set the current element marker C at the second element of the list (C is an integer index value)

              5.          while C has not passed U do steps 6 and 7

              6.                if the item at position C is less than the item to its left then exchange these two items

              7.                move C to the right one position

              8.         move U left one position

              9.   stop

 

You must develop your own program driver to illustrate that your sorting algorithm works! 

2. Write a C program that recursively determines if a string is a palindrome. Before your program makes the palindrome determination, you must remove all punctuation characters from the string. Recall a palindrome is a sequence of characters that can be read the same way in either direction. “Madam I’m Adam!” is an example of a palindrome (recall punctuation is removed). Once again, you must develop your own program driver to illustrate that your program works. You may use any library functions you wish. 

3. Write a C program that encrypts and decrypts strings using the Caesar Shift Cipher. The shift value must be an integer, but may be positive or negative. If the shift value is 4, then an ‘A’ becomes ‘E’. If the shift value is -4, then ‘A’ becomes ‘W’. Note, the plaintext messages are encrypted using alphabetic characters only. Also, all characters in the messages must first be converted to uppercase before encrypting or decrypting them. Develop your own program driver to illustrate that your program works. You may use any library functions you wish.

Reference no: EM13499394

Questions Cloud

Stress causes-stress effects and management : In a seperate paragraph for each what is (1)Stress Causes, (2) Stress Effects, and (3) Stress management and the 4) is indicate what your stress signs are....and what your favorite stress relief strategies are....
Cognitive development in middle childhood : Explain and analyze one of the approaches to cognitive development in middle childhood.
Heavy stone strike the concrete pavement : A person sees a heavy stone strike the concrete pavement. A moment later two sounds are heard from the impact: one travels in the air and the other in the concrete, and they are 1.07s apart.
Define conformity and summarize solomon : Define conformity, and summarize Solomon Asch's experiment and conclusions. Summarize the major types of psychological disorders.
Write a c program that recursively determines : Write a C program that recursively determines if a string is a palindrome. Before your program makes the palindrome determination, you must remove all punctuation characters from the string.
Define the fundamental attribution error : Define the fundamental attribution error and explain how it distorts social perception. Describe the effect of cognitive dissonance on behavior and attitude change.
Sources need to be complementary for motivation to occur : Do internal and external sources need to be complementary for motivation to occur?
Forgetting occurs because information : Which of the following best explains how forgetting occurs because information in our memory has changed to become more consistent with our beliefs
Conformity conducted by asch-milgram and sherif : What are the three classic studies of conformity conducted by Asch, Milgram, and Sherif. What is the nature of their studies, any cover stories that were used, the general methodology employed, and the results

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implemented a regular binary search tree

In Computer Science I, you implemented a regular binary search tree. Due to your busy schedule, you've decided that it would be best if you could simply reuse this code without any changes. You realize that your code would ONLY work for Arup's ass..

  Write song playlist class-object-oriented design principles

Write a song playlist class in C++ called "PlayList" using object-oriented design principles. The playlist should support the following ADT.The implementation should be based on an array of strings to store the song titles.

  Given the following test scores and grade equivalents

Given the following test scores and grade equivalents, write a function which is passed a score, and returns a letter grade based on the score entered. A number less than 0 or greater than 100 is invalid.

  Called cbankaccount

Create a base class, called CBankAccount, and two additional classes (each derived from CBankAccount), called CSavingsAccount and CCheckingAccount.

  Write c program that will input two values from the user

write c program that will input two values from the user with a prompt ? that are a value and a base with which you

  Users to input two forces by their components

write a programm to ask users to input two forces by their components of (Fx1,Fy1) and (Fx2,Fy2) from the keyboard.call twice the function to display both magnitude and direction angle of two forces on the screen.add two forces and display both magni..

  Define a function hypotenuse that calculates the hypotenuse

Define a function hypotenuse that calculates the hypotenuse of a right triangle when the other two sides are given. The function should take two arguments and return the hypotenuse as a double.

  Write function that finds the minimum of three double value

1. Write a function that finds the minimum of three double values. This function should use another function that finds the minimum of two double values.

  Assignment 1 boxing amoebadevelop a two dimensional

assignment 1 boxing amoebadevelop a two dimensional interactive game with the following features1.use opengl any

  Dynamic character arrays

Dynamic character arrays str and add contain strings. Write a function append that uses str and add as arguments and appends add to the end of str. Write a main program that illustrates the use of function append to concatenate five strings.

  Write a c++ statement that multiplies the value

Write a program that prompts the user to input a decimal number and outputs the number rounded to the nearest integer.

  Program to be implemented in c language - operating system

program to be implemented in c language - operating system and cpu scheduling and linux schedulerspurposethe purpose of

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd