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

UBC CPEN 223 - FINAL exam with correct answers

Rating
-
Sold
1
Pages
32
Grade
A+
Uploaded on
28-08-2024
Written in
2024/2025

3 C's for "good Software" correct answers- Correct (safe from bugs) - Comprehensible (easy to understand) - Changeable (ready to change) Static Checking correct answersThe checking that is done at compilation. - Bug automatically found before program runs Dynamic Checking correct answersThe checking that is done at run time. - Found automatically Benefits of C# correct answers-Safety > Type safe, static checking, exception handling, etc - Ubiquity > Multiplatform: Mobile, Web, Windows/Mac/Linux - Elegance - Popular - Powerful - High-level - Modern object oriented Issues with C# correct answers- Verbose: takes a lot of code to do simple task - Large: many features static void Main() correct answersThe starting place of a program

Show more Read less
Institution
UBC CPEN 223 - F
Course
UBC CPEN 223 - F











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

Written for

Institution
UBC CPEN 223 - F
Course
UBC CPEN 223 - F

Document information

Uploaded on
August 28, 2024
Number of pages
32
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

UBC CPEN 223 - FINAL

3 C's for "good Software" correct answers- Correct (safe from bugs)

- Comprehensible (easy to understand)

- Changeable (ready to change)



Static Checking correct answersThe checking that is done at compilation.

- Bug automatically found before program runs



Dynamic Checking correct answersThe checking that is done at run time.

- Found automatically



Benefits of C# correct answers-Safety

> Type safe, static checking, exception handling, etc

- Ubiquity

> Multiplatform: Mobile, Web, Windows/Mac/Linux

- Elegance

- Popular

- Powerful

- High-level

- Modern object oriented



Issues with C# correct answers- Verbose: takes a lot of code to do simple task

- Large: many features



static void Main() correct answersThe starting place of a program

,int varName = 92; correct answersDeclaring an int type variable



double VarName = 1.45; correct answersDeclaring a double type variable



char varName = '*'; correct answersDeclaring a char type variable



Two categories of C# types correct answers- Value types

- Reference types



C# operators correct answers- arithmetic ( +, -, /, % (remainder), *)

- comparison (==, !=, >, >=, ...)

- conditional (&&, ||, !)



C# selection statements correct answers- if(condition)

- else if(condition)

- switch *an alternative to if-else statements



C# repetition statements correct answers- while

- for

- do-while



Class correct answersThe most important user defined type

- Contains two types of members;

> Data members (fields, ..) that store the data within the ______.

> Function members (methods, constructors, ...) that perform operations on the data



Methods correct answersA block of code that contains a series of statements.



Arrays correct answersstores a fixed-size collection of elements

,How to initialize an array correct answersint[] nameOfVariable = new int[5];

- The size of the ______ is 5.

int [] nameOfVariable = new int[] {1, 2, 3, 4, 5};

int [] nameOfVariable = {1, 2, 3, 4, 5};



What is a Data Type? correct answersA _____ is a set of values and the operations that are permitted on
the values



Value pre-defined types correct answers- int

- long

- double

- char

- uint

- bool

- decimal

- bool

- byte

- sbyte

- float

- uint

- short

- ushort



Reference pre-defined types correct answers- object

- string

- dynamic

, A value type correct answersThis type needs only one allocated memory space that stores the actual
data.



A reference type correct answersThis type stores the *mention to some other memory location where
the actual data is stored.



Two regions of memory that store data correct answers- stack

- heap



Stack correct answerslocation for storage of value types

(last-in, first-out data structure)

- Primary operations:

> push() : addition of an element to the top of the stack

> pop() : removal of an element from the top of the stack

> Clear()

> Remove()

> ToArray()

> Contains()

> Count()



Heap correct answersThe reference type is stored in the stack but the actual data is stored in the
"______"



User-defined types correct answers- class

- struct

- array

NOTE: can be classified as either reference or value types



_______ is a type that stores logically related data and functions correct answersa class

Get to know the seller

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.
QUILLSKY Yale University
View profile
Follow You need to be logged in order to follow users or courses
Sold
510
Member since
2 year
Number of followers
275
Documents
13973
Last sold
4 days ago
,STUDY GUIDES,TESTBANKS AND QUALITY EXAMS IS THE KEY TO STUDENTS CAREER EXCELLENCE!!!

On this page, you find all documents, package deals, and flashcards offered by seller MAXGRADES WELCOME TO MAXGRADES ALL THE BEST !!!!!!

3.5

128 reviews

5
48
4
23
3
29
2
6
1
22

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