Skip to content

AlbeartoZ-hang/Assignment4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assignment 4

Objectives

To gain a solid understanding of arrays and strings in C.

Part 1

  1. Write a program sum.c given an array of n integers where n > 1, return an array of same size as the input array where every index of the output array is the cumulative sum of elements in the array so far. You can have it so that the array is input by the user.

  2. Write a program vowels.c that takes a string as input, removes vowels, and outputs the new string.

  3. Implement an algorithm to determine if a string has all unique characters. Name this program unique.c.

Part 2

  1. How can you concatenate strings in C?
  2. If a static array is not initialized, what will the size automatically be set to?
  3. How would you declare a multidimensional array of size 64? Explain your answer.
  4. In your own words, explain what each of the following functions does and returns:
    • strcmp()
    • fgets()
    • strcat()
    • strlen()

Submission Guidelines

Please include your name and a description in a comment at the top of your code files. Please also include your name at the top of your assignment4.txt file. Submit by Wednesday, July 27th at 10am.

About

Assignment 4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%