Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Document preview thumbnail
Voorbeeld 2 van de 7 pagina's
Tentamen (uitwerkingen)

CSCI 1730 Midterm Exam Questions with Correct Answers Latest Update 2025/2026

Document preview thumbnail
Voorbeeld 2 van de 7 pagina's

CSCI 1730 Midterm Exam Questions with Correct Answers Latest Update 2025/2026 Phases of a C program - Answers 1. edit, 2. preprocess, 3. compile, 4. link, 5. load, 6. execute editing phase - Answers the program is created in the editor and stored on the disk preprocess phase - Answers the preprocessor program processes the code compile phase - Answers compiler takes the code from source files - object code and stores it on disk linking phase - Answers the linker links the object code with the libraries and creates (object code - executable program) and stores it on disk loading phase - Answers the loader takes the program from the disk and puts it in primary memory executing phase - Answers the CPU takes instruction and executes it, possibly storing new data values as the program executes preprocessor directives - Answers #include, tell preprocessor what contents to include when processing code #include stdio.h - Answers tells preprocessor to include the contents of stdio.h, which contains input/output operations (such as printing to the screen) printf() - Answers prints text to screen, but to print variables within a string, you must include format specifiers within the string, followed by the variables as subsequent arguments to the function %d - Answers base 10 signed int %u - Answers base 10 unsigned int %f - Answers floating point values %p - Answers pointers %x - Answers hexadecimals %c - Answers characters %s - Answers strings compiling and linking - Answers done in one step with one C source file, done separately with multiple source files; to compile and link the source file - pass it as argument to gcc - generates executable file named , but to specify name: gcc -o name file.c makefile - Answers must be located in same directory as the C source files; cl, run, and clean = targets - can be given to make utility as arguments, first target = default target, either named makefile or Makefile; targets can be followed by dependencies after colon ; flags added will scrutinize source code more strictly so it follows the strict C standard better default target - Answers the target that is assumed when no argument is passed to make; the first target in the makefile target dependencies - Answers could be a file that needs to exist in current working directory or another target that will be executed before executing the current target 4 basic data types - Answers char, int, float, and double - can be combined with modifiers signed, unsigned, short, and long signed - Answers leftmost bit in the binary representation is reserved for a signed bit, 0 = non-negative value represented, 1 = negative value represented unsigned - Answers all the bits in the binary representation are used to represent a non-negative value char - Answers exactly one byte (8 bits) to store a single character - only fundamental

Voorbeeld van de inhoud

CSCI 1730 Midterm Exam Questions with Correct Answers Latest Update 2025/2026

Phases of a C program - Answers 1. edit, 2. preprocess, 3. compile, 4. link, 5. load, 6. execute

editing phase - Answers the program is created in the editor and stored on the disk

preprocess phase - Answers the preprocessor program processes the code

compile phase - Answers compiler takes the code from source files -> object code and stores it
on disk

linking phase - Answers the linker links the object code with the libraries and creates a.out
(object code -> executable program) and stores it on disk

loading phase - Answers the loader takes the program from the disk and puts it in primary
memory

executing phase - Answers the CPU takes instruction and executes it, possibly storing new data
values as the program executes

preprocessor directives - Answers #include, tell preprocessor what contents to include when
processing code

#include <stdio.h> - Answers tells preprocessor to include the contents of <stdio.h>, which
contains input/output operations (such as printing to the screen)

printf() - Answers prints text to screen, but to print variables within a string, you must include
format specifiers within the string, followed by the variables as subsequent arguments to the
function

%d - Answers base 10 signed int

%u - Answers base 10 unsigned int

%f - Answers floating point values

%p - Answers pointers

%x - Answers hexadecimals

%c - Answers characters

%s - Answers strings

compiling and linking - Answers done in one step with one C source file, done separately with
multiple source files; to compile and link the source file -> pass it as argument to gcc -
generates executable file named a.out, but to specify name: gcc -o name file.c

, makefile - Answers must be located in same directory as the C source files; cl, run, and clean =
targets - can be given to make utility as arguments, first target = default target, either named
makefile or Makefile; targets can be followed by dependencies after colon ; flags added will
scrutinize source code more strictly so it follows the strict C standard better

default target - Answers the target that is assumed when no argument is passed to make; the
first target in the makefile

target dependencies - Answers could be a file that needs to exist in current working directory or
another target that will be executed before executing the current target

4 basic data types - Answers char, int, float, and double - can be combined with modifiers signed,
unsigned, short, and long

signed - Answers leftmost bit in the binary representation is reserved for a signed bit, 0 = non-
negative value represented, 1 = negative value represented

unsigned - Answers all the bits in the binary representation are used to represent a non-negative
value

char - Answers exactly one byte (8 bits) to store a single character - only fundamental type with
a standard size that is specified, other types it depends on compiler implementation

sizeof() - Answers to get number of bytes for a type, parameter = a variable

x << y - Answers all bits in x shifted left y bits; left shift once produces a result 2 times the
original integer

x >> y - Answers all bits in x shifted right y bits, right shift once produces a result that is original
integer divided by 2

~x - Answers all bits in x flipped, 0->1 or vice versa

x & y - Answers each bit in x AND each bit in y

x | y - Answers each bit in x OR each bit in y

x ^ y - Answers each bit in x XOR each bit in y

mask - Answers can be used to set bits in a variable either on, off, or inverted from on to off, on
= 1, off = 0

turn bits on - Answers use OR |

turn bits off - Answers use AND &

decimal - Answers base 10, 10 available digits, 1-9

Documentinformatie

Geüpload op
14 december 2025
Aantal pagina's
7
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
€10,53

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
joshuawesonga22
3,5
(14)
Verkocht
119
Volgers
2
Items
15119
Laatst verkocht
14 uur geleden


Echte notities, van echte studenten
Elk document op Stuvia is geschreven door een medestudent die hetzelfde vak deed. Zo leer je van iemand die het al heeft gehaald.



Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen