Module 1.4 Flashcards

1
Q

● Bits
● Bytes
● Binary Number System (base 2)
● Decimal Numebr System (base 10)
● Binary number System
● Octal Number System (base 8)
● Hexadecimal Number System (base 16)

A

Data Representation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

○ With only 8 bits, you can represent 28 or 256 different decimal values ranging from 0 to 255. This is 256 different characters or different combinations of 0 and 1.

○ The binary numbering system is used to represent the language of the computer. The binary number 01000001 is equivalent to the decimal value 65, which represents the uppercase character A.

○ Fortunately, you do not have to retrain yourself to speak that language.

A

Character Sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The character set used by programmers of C# is called ;
the universal character-encoding schema

A

Unicode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ASCII meaning

A

American Standard Code for Information Interchange (ASCII)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Kilobyte 2^10 (1,024) (KB)
Megabyte 2^20 (1,048,567) (MB)
Gigabyte 2^30 (1,073,741,824) (GB)
Terabyte 2^40 (1,099,511,627,776) (TB)
Petabyte 2^50 (1,125,899,906,842,624) (PB)
Exabyte 2^60 (1,152,921,504,606,846,976,) (EB)
Zettabyte 2^70 (1,180,591,620,717,411,303,424,) (ZB)
Yottabyte 2^80 (1,208,925,819,614,629,174,706,176) (YB)

A

Kilobyte 2^10 (1,024) (KB)
Megabyte 2^20 (1,048,567) (MB)
Gigabyte 2^30 (1,073,741,824) (GB)
Terabyte 2^40 (1,099,511,627,776) (TB)
Petabyte 2^50 (1,125,899,906,842,624) (PB)
Exabyte 2^60 (1,152,921,504,606,846,976,) (EB)
Zettabyte 2^70 (1,180,591,620,717,411,303,424,) (ZB)
Yottabyte 2^80 (1,208,925,819,614,629,174,706,176) (YB)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data Representation Trivia
● Notice that kilo is about a thousand, mega is about a million, giga is about a billion, and so on.

● So, when you think about a machine that has a 64-bit processor with 4 GB of RAM and 1 TB of hard disk space, you know that the machine can process 64 bits at one time, store approximately 4 billion characters in memory, and has storage capacity for approximately 1 trillion characters on the hard disk.

A

TRIVIA LANG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

○ These are names of elements that appear in a program, such as data items. Some _______ are predefined; others are user-defined.

○ Examples: System, Main, Console, WriteLine

A

Identifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Rules for creating an identifier in C#
1. A combination of alphabetic characters (a–z and A–Z), numeric digits (0–9), and the underscores (_) can be used. Identifiers can be long; however, many systems consider the first 31 characters unique.

  1. The first character in the name may not be a numeric digit.
  2. No embedded spaces can be placed between the characters. This
    means you cannot separate words in a name by a space. Normally, you concatenate (append) second and subsequent words onto the identifier by capitalizing the beginning letter of each word after the first.
  3. Keywords are predefined reserved identifiers that have special meanings to the compiler. They cannot be used as identifiers in your program.
A

Rules for creating an identifier in C#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  • represents an area in the computer memory where a value of a particular data type can be stored. When you declare this, you allocate memory for that data item in your program.

-Declaring this requires that you select an identifier and determine what type of data will appear in the memory cell. The syntax for declaring a variable follows:

type identifier = expression;

A

Variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A variable’s value can change. These are the numbers, characters, and combinations of characters used in your program. They can be assigned to a variable or used
in an expression.

A

Literal Values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Every time you declare a variable in the C# language, you are actually instantiating a class (creating an object). If you declare three variables of int type, you are instantiating the class three times; three int objects are created. The following statement creates three int objects:

int homeWorkScore1;
int examNumber1;
int numberOfPointsScored;

A

no answer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • are often used to give a value to an object’s data portion. This can be done when the object is created or later in the program statements. A value such as 100 could be assigned to homeWorkScore1 using the following statement:

homeWorkScore1 = 100;

  • Here 100 is a numeric literal. The contents of the memory location where the variable homeWorkScore1 stored the value 100 can be changed; however, the literal value of 100 cannot be changed. 100 is always 100.
A

Literal Values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Grade point average
Current age
Full name
Final grade in a course

A

Description grade

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

gradePointAverage
age
studentName
courseGrade

A

Identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

double / 3.99
int / 19
string / Elizabeth Hill
char / A

A

Data Type / Data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

is an instance of a class. It is an occurrence of the class. For
simplicity purposes, you can think of an instance of the base type int as 21 or 3421.

A

Objects

17
Q

● However, includes more than just the data associated with the type.
● is the term used to denote the encapsulation of data and behaviors into a single package or unit. The characteristics of the behavior and data can be described.

A

Class

18
Q

CAR, ANIMALS

A

class

19
Q

audi, nissan, volvo

A

Object

20
Q

are often called the fundamental data types or primitive data
types of the language. They are the common types needed by most
applications.

A

value types

21
Q

C # type
byte (integral) (System.Byte)
sbyte (integral) (System.SByte)
char (integral) (System.Char)
decimal (decimal) (System.Decimal)
double(Floating-point) (System.Double)
float(Floating-point) (System.Single)
int (integral) (System.Int32)
uint (integral) (System.UInt32)
long (integral) (System.Int64)
ulong (integral) (System.UInt64)
short (integral) (System.Int16)
ushort (integral) (System.UInt16)

A

value types

22
Q

int StudentCount; // number of students in the class
int ageOfStudent = 20; // age - originally initialized to 20
int numberOfExams; // number of exams
int courseEnrolled; // number of course enrolled

A

Note
Integral Data types

23
Q

basahin nyo nalang sa ppt yung iba

A
24
Q

● is based on true/false, on/off logic.
● The only Boolean type in C# is bool. A bool variable can have a value of either true or false. One example of the bool type being very useful is in determining when all data has been processed.

bool undergraduateStudent;
bool moreData = true; // used to indicate when all the data is processed. orginally set to true

A

Boolean Variables

25
Q

represents a string of Unicode characters

string studentName;
string courseName = “Application Development I”;
string twoLines = “Line1\nLine2”; //newline escape sequence character included

A

Strings

26
Q

are convenient for assigning a value to an identifier; const forces
the functionality of not allowing the value to be changed.

const type identifier = expression;
const double TAX_RATE = 0.0675;
const int SPEED = 70;
const char HIGHEST_GRADE = ‘A’;

A

Constants

27
Q

An assignment statement takes the form of

variable = expression;

A

Assignment Statement

28
Q

Basahin nyo nalan sa ppt yung iba

A