L1- C Flashcards
Source code
What humans write in a high-level language.
Machine code
Binary, which computers understand, which is a low-level language
Compiler
A program that translates one language to another language. For this example, it’s converting c to machine language
Terminal window/console
Command line interface where you only use your keyboard
GUI -(gooey)
Graphical user interface which are the buttons and things that you click on
code
What does this command line program for this CS50 class do?
Open/create a new file to write
Usage: code filename. fileExt
code hello.c
make
What does this command line program for this CS50 class do?
Compiles the file
Usage: make filename
make hello.c
Creates the executable without the ext
hello
Command: ./
Runs the executable
Usage: ./Executable filename
./hello
Command line: $
Represents the prompt in the terminal window
Command line: .
Current folder?
Command line: ..
Parent folder (up one folder)
Escape sequence
specially delimited text in a character or string literal that represents one or more other characters to the compiler. It allows a programmer to specify characters that are otherwise difficult or impossible to specify in a literal.
An escape sequence starts with a backslash () called the escape character and subsequent characters define the meaning of the escape sequence. For example, \n denotes a newline character.
The same or similar escape sequences are used in other, related languages such C, C++, C#, Java and PHP
Libraries
Code someone else wrote that needs to be included to use the functions within the file.
Ex: #include <stdio.h>
Standard io.h - input/output for C</stdio.h>
.h file
Header file that gives you access to the libraries (functions)
stdio.h
String
Text
“This is a string.”
Int
Integer
32 bit Real #
123
~4 billion positive # or ~2 billion negative
Float
Floating point
32 bit Decimal
1.23
~4 billion positive # or ~2 billion negative
Char
Character
Exactly one uppercase letter
‘A’
Long
Integer
64 bit Real #
123
More than 4 billion positive/2 billion with negative
Double
64 bit Decimal (Floating point)
1.23
More than 4 billion positive/2 billion with negative
Clear command line
Ctrl+l