CSCI 3120 Operating Systems - Assignment 1- A Simple C Program for Linux


  • 作业标题:CSCI 3120 - Assignment 1: A Simple C Program for Linux
  • 课程名称:Dalhouse University CSCI 3120 Operating Systems
  • 完成周期:1天

1. Assignment Overview

In this assignment, you need to design and implement a C program that prompts the user to
enter a sentence, splits the sentence into multiple words, then displays the words on the
screen and places the words in a new file. Your program will be tested on the undergraduate
server “csci3120.cs.dal.ca”, which is a Linux machine.

2. Important Information

There is a zero-tolerance policy on academic offenses such as plagiarism or inappropriate
collaboration. By submitting your solution for this assignment, you acknowledge that the
code submitted is your own work. You also agree that your code may be submitted to a
plagiarism detection software (such as MOSS) that may have servers located outside Canada
unless you have notified me otherwise, in writing, before the submission deadline. Any
suspected act of plagiarism will be reported to the Faculty’s Academic Integrity Officer in
accordance with Dalhousie University’s regulations regarding Academic Integrity. Please
note that:

  1. The assignments are individual assignments. You can discuss the problems with your
    friends/classmates, but you need to write your program by yourself. There should not be
    much similarity in terms of coding.

  2. When you refer to some online resources to complete your program, you need to
    understand the mechanism, then write your own code. Your code should not be similar to
    the online resources. In addition, you should cite the sources via comments in your program.

3. Detailed Requirements

  1. Overview: In this assignment, you need to design and implement a C program that prompts the user to enter a sentence, splits the sentence into multiple words, then displays the words on the screen and places the words in a new file. The following steps should be implemented in your program:

Step 1: Prompt Displaying: When your program is executed, the following prompt should be
displayed on the screen, asking the user to enter a sentence. Then the user could enter a
sentence on the same line.
Please Enter Your Sentence:

Please note that:
a) The user sentence is composed of multiple words (i.e. 2 or more words).
b) There is only one space between neighboring words.
c) In this assignment, each word is composed of a series of symbols (i.e. 2 or more
symbols) and each symbol in a word can be a letter or a numeric digit (i.e. 0, 1, …, 9)
or a punctuation mark that can be found on a keyboard.
d) In addition, you can assume that the user input is composed of 1 symbol at the least
and 200 symbols at the most. This range for user input (i.e. 1-200 symbols) applies to
spaces. Namely, each space is counted as a symbol in the user input.

Step 2: Input Processing: After the user enters a sentence and presses the return key, your
program receives the input and splits the user input into multiple words. Then the words are
displayed on the screen.

。。。


文章作者: IT神助攻
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 IT神助攻 !
  目录