×
Log in to StudySoup
Get Full Access to Temple - CIS 2107 - Class Notes - Week 2
Join StudySoup for FREE
Get Full Access to Temple - CIS 2107 - Class Notes - Week 2

Already have an account? Login here
×
Reset your password

cis 2107

cis 2107

Description

School: Temple University
Department: Computer Programming
Course: Computer Systems and Low-Level Programming
Professor: John fiore
Term: Spring 2017
Tags: C and programming
Cost: Free
Name: CIS2107 quiz1 guide
Description: core materials to understand before acing quiz_1
Uploaded: 01/11/2017
2 Pages 104 Views 1 Unlocks
Reviews



What’s the primary job of the linker?




What command would we type to delete a folder called stuf?




What would we type in the unix shell to change our current directory to the parent directory?



Study guide for quiz 1 What would we type in the unix shell to change our current directory to the parent  directory?  Solution: cd ..  What command would we type to delete a folder called stuf?  Solution: rmdir stuf or rm -fr stuf  What would we type in the unix shell in oDon't forget about the age old question of What is meant by introspection?
If you want to learn more check out chromatin that is extended and transcribable is called
Don't forget about the age old question of eng 1010
Don't forget about the age old question of What is the smallest unit of a biological system?
We also discuss several other topics like wvu sona
We also discuss several other topics like What is the difference between correlational and descriptive research?
rder to run a program called date, but  reading its input from a file called dates.txt instead of the keyboard?  date < dates.txt  What’s the primary job of the linker?  Solution: Among other things, the linker combines our object files with the objects  found in li- braries that we’ve used in our programs to form an executable.  What would we type in the unix shell in order to run a program called date, but  writing its output to a file called dates.txt instead of the screen?  Solution: date > dates.txt  The storage hierarchy of a computer is a kind of a pyramid. What two things are true  the farther up pyramid you go?  Solution: The farther up, the faster the access times but the more expensive it is so  we have less of it.  What’s the primary job of the C compiler? Note: it is not to find syntax errors.  Solution: It’s to translate C into assembly.  Write a function, which is passed a C string. The function reverses the string. For  example, if the string passed to your function is vacation, after the function, the  string is noitacav. You may use functions in the Standard C Library. Solution: One possibility:  #include <string.h>  void reverse_string(char s[]) { int i, j; char t;   for (i=0, j=strlen(s)-1; i<j; i++, j--) { t=s[i];  s[i]=s[j];  s[j]=t; } }  Write a function which is passed two C strings: s (for source) and d (for destination),  and an integer nc (for num characters). The function copies at most nc characters  from s into d. (Hint: don’t forget to copy the null character)  Solution: One possibility:  void my_strcpy(char d[], char s[], int nc) { int i;   int end=min(nc, strlen(s));   for (i=0; i<end; i++) d[i]=s[i];  d[i]=’\0’; }  int min(int a, int b) { if (a<b)   return a; return b;  }

Page Expired
5off
It looks like your free minutes have expired! Lucky for you we have all the content you need, just sign up here