Search Header Logo

ComPro Global variable

Authored by noi pc

Computers

1st Grade

Used 2+ times

ComPro  Global variable
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

กำหนด function f1 ดังนี้

int f1(int x, float y) { ...... }

ฟังก์ชัน f1 เป็นฟังก์ชันชนิดใด

ไม่มี return value

ไม่มี parameter

มี return value

ไม่มี parameter

ไม่มี return value

มี parameter

มี return value

มี parameter

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ข้อใด**ผิด** เมื่อกล่าวถึง ตัวแปร global

เป็นตัวแปรที่ประกาศนอกฟังก์ชัน

เมื่อประกาศตัวแปร global แล้วฟังก์ชันอื่นที่อยู่ด้านล่างของการประกาศตัวแปร global สามารถใช้งานตัวแปรนี้ได้

เป็นตัวแปรส่วนตัว ใช้เฉพาะในฟังก์ชันที่ประกาศตัวแปรนี้เท่านั้น

หากประกาศตัวแปรนี้บนสุดของโปรแกรม ทุกฟังก์ชันสามารถใช้งานตัวแปรนี้ได้

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ถ้าเมนโปรแกรมเรียกใช้ฟังก์ชัน f1 ดังนี้

f1(int x, int y)

ส่วนหัวของฟังก์ชัน f1 ควรเขียนอย่างไร

void f1(x, y){ ... }

void f1(int x,y ){ ... }

void f1(int x, int y){ ... }

void f1( ){ ... }

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

คำสั่ง ceil(1.2) จะให้ผลลัพธ์เท่าใด

1

1.20

2

1.5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

ตัวแปรใดเป็นตัวแปร global

x

y

x, y

a, b, y

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?