CSCI 1320 midterm 1
Terms
undefined, object
copy deck
- !
- not
- !!
- executes last command
- !98
- executes command 98
- !=
- not equal to
- !v
- executes last command beginning with v
- %6.2
- limits total field width to 6 spaces, with two decimal places
- &&
- and
- .
- repeat last edit
- /* [...] */
- inserts block comment
- //
- inserts one line comment
- /0
- null character
- /str, [shift] + N
- searches from cursor forward for str, then looks for next occurrance backward
- 1 byte
- 8 bits/ 2 hex/ 1 char
- 4 parts of a loop
- 1. Initialization/Assignment (x=10); 2. Test until quit (while (x>5){}) 3. Data modification (x = x-1) 4. Body (printf("x is %d",x))
- 7dd
- deletes 7 lines, starting at cursor line
- :4,8 Practice.c
- writes lines 4 through 8 in file Practice.c
- :r Practice.c
- finds Practice.c and enters contents after cursor
- :w Practicing.c
- writes open file under name Practicing.c
- < / >
- less than / greater than
- <= / >=
- less than or equal to / greater than or equal to
- ==
- equal to
- ?str, n
- searches from cursor backward for str, then finds second occurance
- A
- inserts cursor at end of line
-
a.out
- user information collected from inputfile to be used in a.out
- a.out >outputfile
- output from a.out is inserted into outputfile
- binary digit
- bit
- c$
- changes until end of line
- call for boolean library
-
#include
- call for math library
-
#include
- cat first.c
- prints entire file first.c
- cd ..
- moves up one level in file directory
- cd Something
- changes working directory to Something
- cd S[tab]
- completes phrase, in this instance cd Something
- char in Bits, Bytes, Words, and Hex digits
- 8, 1, 1/4, 2
- chmod 644 notes.c
- changes modifications on file notes.c to rw/r/r
- chmod 700 pictures
- changes modifications on directory pictures to rwx or read, write, execute
- cp -r Something CSCI1320
- copies folder CStuff and all contents into folder CSCI1320
- cp first.c first.backup.c
- creates file first.backup.c with same contents as first.c
- create a simple if, else function
- if(condition, using relational operators) { action for true part of construct } else { action for false part of construct }
- create a string of characters of length 20 with name word
- char word[20]
- cw
- change word
- d$
- deletes from cursor to end of line
- dd
- deletes/cuts line
- double in Bits, Bytes, Words, and Hex digits
- 64, 8, 2, 16
- dw
- deletes word
- example of boolean variable
- bool x; x = true; boolean has only two values, true or false
- float in Bits, Bytes, Words, and Hex digits
- 32, 4, 1, 8
- function call for string library
-
#include
- G
- places cursor at bottom of program
- gg
- places cursor at top of program
- halfword
- 16 bits/ 4 hex
- head first.c
- prints first 10 lines of first.c
- history
- shows history of commands
- i
- inserts at cursor
- int in Bits, Bytes, Words, and Hex digits
- 32, 4, 1, 8
- keys that move cursor
- h (left), j (down), k (up), l (right) (ldur = elder)
- lpr first.c
- prints program first.c
- ls
- lists contents of active directory
- ls *.c
- prints all contents that have extension .c
- ls -l
- prints contents of directory in long form
- man ls
- opens manual to entry on ls
- mkdir Something
- creates directory named Something
- mv *.c Something
- moves all files with extension .c to directory Something
- mv first.backup.c first.c
- renames first.backup.c to first.c
- O
- inserts line above cursor
- p
- put/paste
- printf and scanf for char
- %d, %X, %c/ %c
- printf and scanf for double
- %f, %g/ %lf
- printf and scanf for float
- %f, %g/ %f
- printf and scanf for int
- %d, %x/ %d
- printf and scanf for short
- %d, %X/ %d
- printf and scanf for string (char str[20])
- %s/%s
- pwd
- prints working directory - lists folder structure
- r
- replace 1 character
- rm first.c
- removes file first.c
- short int (short) in Bits, Bytes, Words, and Hex digits
- 16, 2, 1/2, 4
- strlen(name)
- tells string length/ number of characters in name, only in string character
- tail first.c
- prints last 10 lines of first.c
- takes square root, in math library
- sqrt(9)
- terminal call for running program that uses math library
- gcc program.c -lm
- three sections of ls -l
- d/rw-/r--/r-- folder/user has read and write privledges/group has read privledges/ everyone has read privlidges
- typing % while cursor is on [, {, or (
- highlights matching pair
- u
- undos last action
- What datatypes support decimal places?
- Float, double
- What datatypes support remainders?
- int, short
- What does = mean?
- assignment, "Calculate the expression on the right hand side, then assign it as the variable on the right hand side"
- word
- 32 bits/ 8 hex
- write a simple construction for a "while" function
- while (condition) { }
- x
- deletes one character
- Y
- yank/copy
- [Ctrl]+c
- stop runaway program
- [Ctrl]+g
- displays locatoin in file and file status
- [Shift] + g , 7
- moves to line 7
- \n
- new line
- ||
- or