Search Header Logo

CP03-01 ชนิดข้อมูลและการประกาศตัวแปร

Authored by Panupong Sornkhom

Computers

University

Used 7+ times

CP03-01 ชนิดข้อมูลและการประกาศตัวแปร
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

การตั้งชื่อตัวแปรในข้อใดถูกต้องในโปรแกรมภาษาซี

James@Bond

007JamesBond

JamesBond007

James(Bond)

James&Bond

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ข้อใด ไม่ใช่ ชนิดข้อมูลพื้นฐานในภาาาซี

char

bool

float

double

int

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ถ้าต้องการประกาศตัวแปร เพื่อเก็บข้อมูลจำนวนเต็มที่มีค่าอยู่ในช่วง - 4,000,000 ถึง 4,000,000 การประกาศตัวแปรในข้อใดเพียงพอต่อการเก็บข้อมูลดังกล่าวและใช้หน่วยความจำน้อยที่สุด (กำหนดขนาดของ short, int, long คือ 2, 4, และ 8 bytes ตามลำดับ)

int n;

unsigned short n;

short n;

unsigned int n;

long n;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ถ้าต้องการประกาศตัวแปร เพื่อเก็บข้อมูลจำนวนเต็มบวกที่มีค่าอยู่ในช่วง 1 ถึง 3 พันล้าน การประกาศตัวแปรในข้อใดเพียงพอต่อการเก็บข้อมูลดังกล่าวและใช้หน่วยความจำน้อยที่สุด (กำหนดขนาดของ short, int, long คือ 2, 4, และ 8 bytes ตามลำดับ)

int n;

unsigned short n;

short n;

unsigned int n;

long n;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ถ้าข้อมูลมีค่า 3.54 เมื่อนำมาเก็บค่าในตัวแปร int จะให้ค่าผลลัพธ์เป็นอย่างไร

3.5

error

0

3.54

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ต้องการประกาศตัวแปรเพื่อเก็บค่าตัวอักษร 1 ตัว ชื่อ c จะต้องเขียนคำสั่งในภาษาซีอย่างไร

letter c;

character c;

char c;

alphabet c;

c = input()

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?