100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSC FINAL EXAM QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
17
Grade
A+
Uploaded on
22-01-2025
Written in
2024/2025

CSC FINAL EXAM QUESTIONS AND ANSWERS

Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
January 22, 2025
Number of pages
17
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CSC FINAL EXAM QUESTIONS AND
ANSWERS

What is the difference between a compiler and an assembler?

STAGE 1 CONTENT QUESTION - ANSWER-An assembler translate assembly lines of
codes like add() push() etc into direct elating machine code. The commands relate
directly to a specific machine code usually with assembly language.

A compiler translates high level language program into machine code, and the code can
work on different types of machine code.

EX: Assembler is like a one to one translator (English - > Spanish) while a compiler can
translate to multiple languages (English -> Dutch, English -> Spanish, English -> Latin,
etc)

What is the difference between interpreted and compiled language?

STAGE 1 CONTENT QUESTION - ANSWER-Interpreted language the code is NOT
per-compiled and the code is compiled and translated as the program runs.

Compiled Language the code is per-compiled before the program runs.

How does the Java Virtual Machine change the way object code is executed?

STAGE 1 CONTENT QUESTION - ANSWER-The JVM runs Java Byte code, which is
compiled from high level language code. It allows for less porting to specific machines
as the code runs on a JVM and then the JVM translates it to any machine code.

How doe we declare a variable

STAGE 1 CONTENT QUESTION - ANSWER-<type> <name> = <value>;
int myAge = 19;

What do we mean by "type" of a variable?

STAGE 1 CONTENT QUESTION - ANSWER-The type means what information the
value will store or how much information the value will store.

int store whole numbers doubles stores a value between -2million something to 2 million
something

,double stores an int with higher precision

etc etc.

What is an assignment statement?

STAGE 1 CONTENT QUESTION - ANSWER-An assignment statement is the
statement that stores a value into a variable.

x = 5; is an example
int x = 5; combines the declarement statement and assignment statement

Explain what this code accomplishes:

x = x + 1;

STAGE 1 CONTENT QUESTION - ANSWER-Adds 1 to the value of x.

Explain why we read the = sign as "gets the value" versus "is equal to"

STAGE 1 CONTENT QUESTION - ANSWER-Because you are passing values into the
expression, and when you look at statements such as this...

int x = 5;
x = x + 5;

It doesn't mean 5 = 10, it means x that used to hold 5 now holds the value of 10 or x
gets the value of 10.

Does the order of the operands in an assignment statement matter? Why or why not?

STAGE 1 CONTENT QUESTION - ANSWER-Yes because the computer evaluates the
right hand side and then stores the value of that side into the left hand side.

What is the purpose of a while statement?

STAGE 1 CONTENT QUESTION
LAB 1 QUESTION - ANSWER-A while statement is a loop that loops through until a
certain condition is no longer true.

int x = 0;
while (x >= 5)
{
x = x + 1;
}

, Explain what the code int i; does

LAB 1 QUESTION - ANSWER-Declares a variable named i whose type is an int.

What is the purpose of breakpoints?

LAB 1 QUESTION
EXAM 1 QUESTION - ANSWER-A breakpoint is placed on a line in the code so the
debugger knows to stop there and go through step by step of the program so the
programmer can determine the problem with the program.

How do you set a breakpoint?

LAB 1 QUESTION - ANSWER-To set a breakpoint, simply click on the blue line to the
left of the code block in Eclipse

What is the difference between debug as and run as?
LAB 1 QUESTION - ANSWER-Run as runs the program not stopping and performs the
task

Debug as runs the program but stops at breakpoints to go through step by step to help
the programmer debug their code

What is a debugger and how do you use it to watch what your code is doing?
LAB 1 QUESTION - ANSWER-A debugger is a tool in the compiler that allows us to run
through the program step by step to determine what is wrong with our program.

Algorithm
STAGE 1 VOCAB - ANSWER-A sequential set of steps that will always find the correct
solution to a problem

Assembler
STAGE 1 VOCAB - ANSWER-A piece of software that translates programs written in an
assembly language into the language of a target machine.

Assembly language
STAGE 1 VOCAB - ANSWER-A programming language where one statement in the
language translates to exactly one statement of machine code

Assignment statement
STAGE 1 VOCAB - ANSWER-A Java statement that stores a value into a variable.

<type> <name> = <value>

Breakpoint
$12.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
EXAMHAVEN

Also available in package deal

Get to know the seller

Seller avatar
EXAMHAVEN Havard School
Follow You need to be logged in order to follow users or courses
Sold
3
Member since
1 year
Number of followers
1
Documents
1525
Last sold
1 month ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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

Frequently asked questions