Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROBLEM 1: Interacting with systems software using standard input and the virtual terminal for output.
- Follow the PASS leader as they ask you to follow their lead exploring your computer. Introduction to the File System using Systems Software. (Windows & Mac)
- Windows Users:
- - Interact with the file system using utility software. (cmd)
- - From the root of the filesystem run through various utilities demonstrating how to (cd, dir) both text files and binary files are
- listed in the Windows environment.
- - Discuss the idea of filepath. (c:\Users\NXXXXX\Desktop).
- o The name of the executable program is a binary file.
- o The programs are created from source files.
- Linux/Mac Users:
- - Interact with the file systems using the bash command terminal. (under utilities)
- - Change directory using the cd utility, list the files using the ls utility.
- Quick List of Useful Commands and the Windows or Linux/Mac Equivalent
- WINDOWS ------ LINUX/MAC
- dir ls (Lists the content of the directory you are in)
- cd cd (Change the current directory. Example: cd Downloads)
- cls clear (Clears all text from the terminal, making it easier to read)
- md mkdir (Make a new Directory. Example: mkdir NewDirectory)
- rmdir rmdir (Remove a Directory. Example: rmdir NewDirectory)
- copy NUL touch (Make a new file of any type. Example: copy NUL file.txt Example2: touch file.txt)
- PROBLEM 2: Fixing Errors in Code
- 3 types of Errors:
- • Syntax errors – wont compile because of incorrect syntax of the language
- • Logical errors – Gets the wrong answers but runs / bad design
- • Run time errors – Program ends unpredictably or unexpectedly / Usually due to accessing memory incorrectly.
- Copy the defective source code below exactly into the IDE of your choice. Attempt to compile it. Examine the compiler errors and fix the syntax errors one at a time starting with the firsterror on top of the errors reported. PASS leaders may need to help with scanf() and printf() modifiers. We learn these functions in Week 2.
- Broken Program Source Code:
- /**************************************************
- * Top comment code is not required for this example.
- * You would put your
- * N number here too.
- **************************************************
- #include <stdioh>
- int main(int)
- {
- int age_In = 0:
- print("Enter in your age please.\n");
- scanf("%d", age_in);
- printf("You told me your age is: %f\n");
- return;
- }
Add Comment
Please, Sign In to add comment