Ovido
Lingua
  • Inglese
  • Spagnolo
  • Francese
  • Portoghese
  • Tedesco
  • Italiano
  • Olandese
  • Svedese
Testo
  • Maiuscole

Utente

  • Accedi
  • Crea account
  • Passa a Premium
Ovido
  • Home
  • Accedi
  • Crea account

C

How many bits are used for integers?

32 bits (4 bytes)

What is the positive and negative ranges for negative and positive integers, respectively?

negative: 2^31
positive: 2^31-1 (-1 because to exclude option 0)

What is an unsigned integer?

a qualifier applied to certain types (int or other data types) that double the positive range of variables of that type at the cost of disallowing negative values

How many bits does char take up?

8 bits (1 byte) with negative range -128 and positive range 127

What American standard ensures the assignment of specific sequence of bits?

the American Standard Code for Information Interchange (ASCII)

What letter maps to the number 65 according to the ASCII standard?

letter A

what number according to the ASCII standard corresponds to the number 0?

48

What are floating-point values?

- also known as real numbers
- contain up to 4 bytes of memory (32 bits)

- limited to how precise we can be

What is the difference between the data types of floating-point values and doubles?

Doubles have DOUBLE the amount of PRECISION:
floating point is 4 bytes (32 bits) and doubles are 8 bytes (64 bits)

Describe the "void" type.

- is a type (not a data type)
- means that functions with void return type don't return a value

- parameter list of a function can be void meaning it doesnt take any parameters

- essentially a placeholder for "nothing"

What are the three terminal commands in cs50.dev used to:
- create a file

- convert it into binary/computer language

- program execution

code filename.c

make filename


filename./

Are boolean data type available in C?

no, booleans are not one of the 5 main data types however by using a library with this data type, booleans can be used

What are the 5 (data) types in C?

integer char, float, doubles, and void

What is a string?

a long series of characters. To use string data types, include the cs50.h header file

What is a string?

a long series of characters. To use string data types, include the cs50.h header file

what is typedefs?

alloes you to create your own data types

what is structs?

a structure : allow you to group an integer and string into one unit (and other types)

to execute a variable, you need...

a data type and variable name

Is this valid?

int height, width;

yes using a common to assign the same data type for several variables is valid

declaration, assignment, or initialization?

int number;

number = 7;

int number = 7;

declaration
assignment

initialization

True or False?

In C, every nonzero value is equivalent to true, and zero is false (boolean)

True

2 main types of boolean expressions?

logical operators - logical AND (&&), logical OR (||) operators


relational operators - tests for equality or inequality, (x > y), (x != y), (x == y)

How are logical NOT (!) operators used?

x !x
true false

false true



logical NOT (!) inverts the value if the operand

What does the function switch() do?

switch(x) {
case 1:

expression;

break;

case 2:

expression;

break;

default:

expression;

}



conditional statement that allows for enumeration of discrete cases instead of using boolean expressions

important to break between each case to not "fall through" each case unless desired

How to use the ternary operator (?:)

int x = (expression) ? 5 : 6;

^ checks expression. if true, assign 5 to variable x and if false assign value 6


in other words, it means...


int x;

if (expression)

{

x = 5;

}

else

{

x = 6;

}

How to use for loops in C?

for (start; expression; increment) {
}

example:

for (int i=0; i<10; i++)

{

}

What is a GUI?

Many modern Linux distributions have graphical user interfaces (GUI) allow easy mouse-based navigation

UNIX-based operating system:

works with apple and Linux (differs from command prompt in microsoft PCs)

What does ls do in the terminal window?

Typing "ls" in the command window lists the files in your workspace

what would typing "cd pset1" do?

Typing this would navigate you to your pset1 folder by using the cd (change directory) command. Typing ls after this, you would see other names if lists in your newly changed directory

ctrl + l OR clear

clears terminal window

How to find where you are in reference to a file?

type "pwd" (present working directory)

what happens if you just type "cd" in the command window?

you will return to your home window tilda

How to make a new directory?

mkdir <directory>
(will make a new subdirectory located in the current directory)

How do you copy files uding the terminak window?

cp <source> <destination>

duplicates the file you specify as <source> which it will save in <destination>


to copy DIRECTORIES, its similar:

cp -r <source> <destination>


where "r" stabds for recursive (tells cp to dive down into the directory and copy everything inside it)

How to remove a file using the command window?

rm <filename>

*note: there is NO recycle bin so confirm your removal kf the file using "y" and "n" keyboard inputs


to avoid *, can force the removal:


rm -f <filename>



to delete a directory:

rm -r <directory>

How to move files using the terminal window?

mv <source> <destination>

allows user to move the file from the location of <source> to the <destination>

Other commands to use in the Linux command line system:

chmod
rmdir

sudo

ln

man

clear

touch

diff

telnet

What is a better way of representing the following in the terminal window?

clang -o hello hello.c

./hello

make ./hello

True or False: If you get an error in your terminal window indicating a oroblrm with one if your functions that is from a library, you can solve the issue by typing the following in the terminal window:

clang -o hello hello.c -lcs50

./hello



note: l in -lcs50 stands for library

True

What is a prototype?

the declaration of a self-defined function in the firnat:
void <filename>(parameter)

... main() ...

4 important steps in C from library to functions in your file via the clang (and make) command:

1. preprocessing: converts #include lines to the underlying prototypes in the file

2. compiling: converts C to assembly language


3. assembly: converts assembly code to the binary code with 0's and 1's for the computer to understand


4. linking: combines compiled binary code from your own file, any #included .h files and stdio.h and links these blocks if code together into one final file of the file name of choice

What function can you use to debug your code and check for logical errors?

debug50 ./buggy
*note: you can click the red circle next to a line (indicates the breakpoint). The debug checker does not run the code on the breakpoint line.

*note: icons at the top of the file allow you to step over or jump into the breakpoint

What are debugging tools available to cs50 students?

printf
debug50

rubber duck (talking to an inanimate object about the steps in your code)

cs50.ai

What is the space (number of bits) allocated to the data types?

TYPE BYTES
bool 1

int 4

long 8

float 4

double 8

char 1

string ?

How is the end of a string identified?

the "break" character /0 (in contrast to just 0 which may be confused

True or False?

Each string ends with \0 in memory

True

What us the char representation of 0?

\0

What is a nul?

a nul represents the termination, or end, of a string by a 0 bit value

what does the following do?

int sequence[5];

initializes an array called sequence with five elements ([5] is NOT a position identifier)

what does argc and argv do?

int main(int argc, string argv[ ])

{

}

argc tells you how many inputs follow the initialization statement ./filename in the command window and argv[ ] actually stores those inputs, for example:

./code 1 2 3 -->

code[0] is ./code

code[1] = 1

code[2] = 2

code[3] = 3

how are arrays different from other variables?

arrays are passed by reference, in other words they are not copied like with other variables but rather the actual array is used (hoping it does not gain an unwanted change). Other variables in C are passedby value in function calls.

what is argc? (command-line arguments)

- Name is a convention
- argc means argument count

- This integer-type argument will store the NUMBER of command-line arguments the user typed when the program was executed

What is argv? (command-line argument)

- name is a convention
- argument vector

- an array of strings the user typed at the command-line when the program was executed

- each element of array is separated by a space when typed

- First element argv[0] is the file name

- last element of argv can be found at element argv[argc-1]

what do O, and theta have in common? (linear searches)

O() is a function that represents the minimum number of steps in a linear search
Ω() is a function that represents the maximum number of steps in a search

Θ() is a function that represents the number of steps when O and Ω are equal (Θ is uppercase theta)

Quiz
Etica
English opposites - copy
English opposites - copy
English opposites - copy
ART APP
English Idioms 🚸
English Adjectives 🏷️
English Nouns 💠
Thomas (Hoofstuk 1-8)
Thomas (belangrike informasie)
Mapeh
Mapeh
MAPEH
English Verbs ✅
Afr Die blou roos
conectores y frases de tiempo
hebreeuws 6
hebreeuws werkwoorden 2
hebreeuws 5
Afrikaans literatureThomas@moord.net
Meanings Lesson 2
libro 3
PERSDEV
human physiology
Derecho
Biotec 2
tecno 2
medical abbreviation
traduce los verbos
Opposites
English opposites
pedia
VERBS IN ENGLISH
deck 1
Meanings 1.2
Meanings 1.3 + 1.4
Meanings 1.1
idjd
SLO - vägbeskrivningar
españolidk
animalsvcvg
Java chapter 7
Java chapter 6
Parties du corps humain
OE vocab (St Andrews)
Here We Went Again
hebreeuws 4
Dagens ord 18/7/24
Cap XII de El Cerebro en Acción. LENGUAJE. Luria
Emoción y Fisiología
Ciclos Sueño-Vigilia:
Bases Fisiológicas de la Percepción y Cognición
Respuestas Fisiológicas al Estrés
Métodos de Medición en Psicofisiología:
Ondas cerebrales
Actividad electrica del cerebro
Sistema Nervioso Autonomo
Neurotrasmisores
Sinapsis
Neurona
vocabulary 3.12
Sistema nervioso periférico
Sistema nervioso central
Lóbulos cerebrales
Cerebro
Accent and Dialect
Vocabulaire français 1
sentence forming phrases
objects
descriptors
psychopathologie 1Bpsychopathologie 1b boxen
Clothes
Sysmex 9100
Abreviaturas y Significados
Gender Theorist's
Aeropuertos de Mexico y sus Codigos OACI/IATA
Estados de México y sus capitales
hebreeuws 3
hebreeuwse werkwoorden 1
hebreeuws 2
hebreeuws 1
1
jankocool quiz
Virus
Entomología
ANTI-LIPEMIC CON'D(PHARMACOLOGY MODULE 3) WK3 (STATINS DRUGS)
1
Psyb32: Anxiety Disorders
french imp vocab for money and finance 30 wordsimp
important conjugation in frenchthi
french body partsno
Bois (who you gonna get lucky with?)Which sexy boy is gonna fart for you tonight? 🤭💚
African American History : Colonial Slavery II
PSYB32: Mood disorders
math question words 2
maths question words
HP2 L
Prefix
ICF accreditering
UNIT5
PSYB32: Somantic and Dissociative Disorders
nutrición adecuada en adultos y ancianos
funciones de medicamentos en adultos y ancianos
medicamentos funciones y características principales en adultos y ancianos
2° nivel de atención atención en adultos e ancianos estrategias y intervenciones
intervenciones del nurse en atención de adultos y ancianos
Cuidados en el adulto y anciano en enfermería
farmacologia del adulto y anciano
f4jr
PSYB32: Eating Disorders
Hrvatski
all questionsmaking progress with children
Arabic VocabWho broke the idols?
EDUC
intermediate exam
Viktiga ämnen för växter
Pattern Dance
multiplikation 1-0
Science-Physics
hahahaha
Slovenščina
inversiones, intervalos y grados tonales
cardiovascular system
ANTI-LIPEMIC(PHARMACOLOGY MODULE 3) WK2
matemáticaqual é meu nome
Techniques de culture du maïs - copie
Legislación 2
Techniques de culture du maïs
Thai Ending Consonant Sound Groups
afrikaaans lit vocabulary
ÉTICA E CIDADANIAO termo ética deriva do grego ethos (caráter, modo de ser uma pessoa). Ética é um conjunto de valores morais e princípios que norteiam a conduta humana na sociedade.
Unit 1 Vocabulary (B2)
BAB 27
ALLEZ STP
Genesis B Vocab
examen de inglés.
Spanska glosor 9:an
Novecento
Ottocento
Estrategias de Producto
Estrategias de Producto
Grammar 2
UNIT4
Grammar
Jobs
Places / landscape
Animals
MERGE oncology
the goths and Boethius vocab
Preface to PC Vocab
like
los conectores discursivos de causa
to
cómo utilizar la palabra right como sustantivo adjetivo adverbio interacción y
vocabulary 3.11
Acide-Base
Énergie
uses of shall/should
Polymers
Deutsches Vokabular 1
DF Wk 8 Recovering Graphics files
Thai Consonant Classes and Tone MarkersHigh class ข ฃ ฉ ฐ ถ ผ ฝ ศ ษ ส ห Middle class ก จ ฎ ฏ ด ต บ ป อ Low class ค ฅ ฆ ง ช ซ ฌ ญ ฑ ฒ ณ ท ธ พ ฟ ภ ม ย ร ล ว ฬ ฮ Middle tone ออ (oɔ) Low tone อ่อ (òɔ) Falling tone อ้อ (ôɔ) High tone อ๊อ (óɔ...
arte de egipto, incluye arquitectura, pintura, escultura
Arte
Settecento
Seicento
Cinquecento
Quattrocento
Trecento
Duecento
Sozialwissenschaftliche Fragen des Sports
vocab
nouns
adjectives
weather
location and distance
verbs
vocab (adverbs and conjunctions)
ncm 107
multifamily sales proposlmuktifamikt sales proposal
java chapter 5
nederlandsnederlands
Mutamenti sintattici-L'ordine della frase -La posizione del pronome soggetto -L'enclisi del pronome atono -La legge Tobler-Mussafia -Le proposizioni completive
Mutamenti morfologici-Numero e genere del nome -Metaplasmi -Formazione degli articoli -L'aggettivo qualificativo -Pronomi personali -Il verbo
for- words
Mutamenti fonetici-Vocali italiane e latine -Accento -Fenomenti del vocalismo: •monottongamento di AU, AE e OE •dittongamento toscano •anafonesi •chiusura delle vocali toniche in iato •chiusura della E protonica in I •...
UNIT8
Foni e fonemi-Fonemi dell'italiano -Alfabeto fonetico -Fenomei sordi e sonori -Fonemi orali e nasali -Vocali -Dittongo, trittongo e iato -Consonanti -Digramma e trigramma
animals
verbs
King Alfred Laws (1) vocab
loveee
UNIT3
practice
SCI QUARTER 1 LESSON 1
Body parts and fisical appearance
eye
eye
Neurones
Slutprov broms
UNIT2
Toleranser
Hindsight needs Corrective Lenses
Topic 1
UNIT1
Ester homologous seris
swedish vocabulary
pedia.
BETA-BLOCKER(TX OF HYPERTENSION(PHARMACOLOGY MODULE 3) WK1
ACE INHIBITOR( TX OF HYPERTENSION) (PHARMACOLOGY MODULE 3) WK1
Calcium Channel Blocker(TX OF HYPERTENSION) (PHARMACOLOGY MODULE 3) WK1
General knowledge
Food
Numbers
Turkish
Teoria celular
Slutprov ATC
Slutprov Växling
Acid formulae
ngb
vocabulary
YOGA ASANA
Origini e varietà dell'italiano-Origini dell'italiano contemporaneo -Varietà di latino -Minoranze linguistiche -Italia dialettale -Italiano standard -Italiano medio -Italiano popolare -Italiano regionale -Latino volgare -Sostrato,...