• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CPSC 1010 Exam 1 Graded A+

Document preview thumbnail
Preview 2 out of 6 pages

CPSC 1010 Exam 1 Graded A+

Content preview

CPSC 1010 Exam 1 Graded A+
101001110000 (base 2) = ? (base 16) - ANSWER-A70

101111011000111010 (base 2) = ? (base 8) - ANSWER-573072

11001 (base 2) = ? (base 10) - ANSWER-25

113(base 10) = ? (base 2) - ANSWER-1110001

202 (base 10) = ? (base 16) - ANSWER-CA

After compiling a program but before it can be executed, this is the step that links or
adds to the object code any other code being included from the program which then
produces the executable program. - ANSWER-Linker

Declare an array of 5 integers called array1 and initialize the array with the values 1-5. -
ANSWER-Int array1[] = {1, 2, 3, 4, 5};

Evaluate the following expression:


!( 1 && !(0 || 1))

a. true
b. false - ANSWER-true

How long has C been around? - ANSWER-45 years
1969 - 1973

How many characters are in this array?

char word1[] = {"CS for all"}; - ANSWER-11 because there is a null character at the end

How many characters are in this array?

char word2[] =
{'a', 'l', 'l', ' ', 'i', 'n'}; - ANSWER-6 characters - no null character because it is not an
array, its a string

int a = 100, b = 2, c = 25, d = 3, e = 1;
int result;

printf ("%d", b++); - ANSWER-2

, int a = 25, b = 0;

if (a == b)
printf ("Values of both variables are equal \n");
else
printf ("Values of both variables are different \n"); - ANSWER-Values of both variables
are different

Is this a valid array declaration?
int array2[] = {1, 2, 3, 4, 5}; - ANSWER-Yes because it defines what is in the array,
doesn't need a size.

The first sub-step when compiling where certain "administrative" things are taken care
of before compiling takes place (example #define or #include). (.i file) - ANSWER-Pre-
Processors

The second sub-step when compiling where the programming language instructions are
broken down into assembly language instructions first (.s file) and then converts each
assembly language instruction into binary code, or object code (.o file). - ANSWER-
Assembler

These are language-specific omissions/errors (missing a semi-colon where one is
required). - ANSWER-Syntax errors

These are logical errors, e.g. using a variable that hasn't been declared yet. - ANSWER-
Semantic errors

These are low-level types of instructions that, starting in the early 1950s, allowed the
programmer to use a somewhat more English-like way of writing instructions by using
abbreviations, or mnemonic codes, to refer to the bit-patterns - ANSWER-Assembly
Language

These are the (low-level) types of instructions that the computer (processor)
understands. They are not human readable; they are machine dependent - only works
on the machine that it is developed for (not portable). - ANSWER-Machine Language

This is a collection of instructions that perform some purpose, solves a specific problem
- ANSWER-Program

This is the process of analyzing & translating the program from the C program language
to a form the computer can understand (machine language); creates an executable -
ANSWER-Compilation

This person was the one who had the idea that programs could be written in more
English-like statements than assembly and machine language; also created the first
compiler - ANSWER-Grace Murray Hopper

Document information

Uploaded on
March 6, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CLOUNDLite
4.0
(131)
Sold
665
Followers
389
Items
12410
Last sold
4 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions