Question

Poll

Q 1

何種轉換會失真?

A. int->char

B.short->double

C.short->long

A. int->char

Q 2

WHY WRONG

bool islog = true;
if(islog){
    cout<<"1";
}else if{
    cout<<"0";
}else{
    cout<<"-1";
}
NO Condition in Line 4

Q 3

GUESS PRINT OUT

int index = 1;
switch(index){
    case 1:
        cout<<"HI"<<endl;
    case 0:
        cout<<"YO"<<endl;
    default:
        cout<<"NO"<<endl;
}
> HI
> YO
> NO

Q 4

GUESS PRINT OUT

for(int i=0;i<10;i++){
    if(i==5){
        continue;
    }
}
> 0
> 1
> 2
> 3
> 4
> 6
> 7
> 8
> 9

Q 5

What's the purpose of this code?

void swap(int &a, int &b){
    int hold = a;
    a = b;
    b = hold;
}
To exchange the value 
of two variables

Q 6

What's the dimension of this array?

int **ptr;
ptr = new int*[4];
for(int i=0;i<4;i++){
    ptr[i] = new int[];
}
array[4][4]

second dimension

Q 7

Charset Setting

A. <meta>

B. <link>

C. <script>

A. <meta>

Q 8

How to insert a youtube video in HTML

A. <application>

B. <iframe>

C. <link>

B. <iframe>

Q 9

The Area of this div.

div {
    width: 300px;
    height: 300px;
    border: solid 3px black;
    padding: 5px;
    margin: 10px;
}
300 + 5*2 + 3*2 = 316px

316 * 316 px^2

Q 10

HTML的起始標籤是哪兩個東西所組合成?

Tag Name & Attributes
<div id="..."></div>

Q 1 1

HTML終止標籤是哪兩個東西所組合成?

Tag Name & /
<div></div>

Q 1 2

Where is HTML <style> be put in common? 

<head>
    <style></style>
</head>

Q 1 3

THE FULL NAME OF HTML 

A. Hydrotrimorphilism

B. 沒有全名,HTML就是原名

C. Hypertext Markup Language

C. Hypertext Markup Language

Q 14

HTML 常用選擇器

ID Selector
Class Selector

Q 15

邏輯運算子有?

&& (And)
|| (Or)
!  (Not)

Q 16

What does this code do?

document.getElementById("id")
    .style
    .backgroundColor = "gray";
Change the Background 
Color in id named "id"

Q 17

What does this code do?

var x = Math.ceil(Math.random()*5);
X might be 1 to 5.

Q 18

Correct or Not?

var x = 1;

var function SaySome(){
    console.log("HELLO");
}
False.

A function doesn't need 
var to declare.

Q 19

To add a item in an array,we can...

//A
arr.append();
//B
arr.pop();
//C
randomArr(arr);
A

Q 20

How to get the present time?

//A
var str = date();
//B
var str = new Date();
//C
var str = Date();
B

deck

By wiasliao

deck

  • 73