wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ตัวแปรและประเภทข้อมูลในภาษาC

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

ข้อใด หมายถึงฟังก์ชันหลักของภาษา C

a)

#include <stdio.h>

b)

int main ( )

c)

integer

d)

image

2.

ข้อใด หมายถึงไฟล์ส่วนหัว(header) ของภาษา C

a)

#include

b)

int main ( )

c)

integer

d)

image

3.

ข้อใด หมายถึงข้อมูลประเภท ตัวหนังสือ ตัวอักษร

a)

dodble

b)

int

c)

float

d)

char

4.

ข้อใด หมายถึงข้อมูลประเภท ตัวเลข หรือจำนวนเต็ม

a)

flaat

b)

int

c)

double

d)

char

5.

ประเภทข้อมูล ในภาษาC เรียกว่า....

a)

Data type

b)

Data tirp

c)

Data devolopment

d)

Data literacy

6.

ฟังก์ชันใดที่ใช้ในการรับข้อมูลเข้าทางแป้นพิมพ์

a)

for ( )

b)

scanf( )

c)

printf( )

d)

main ( )

7.
  1. จากรูป คำสั่งใดที่หายไป

a)

for ( )

b)

scanf( )

c)

printf( )

d)

int main ( )

8.
  1. ตัวระบุรูปแบบ ในการส่งออกข้อมูลประเภท ตัวอักษร หรือตัวหนังสือ คือข้อใด

a)

%d หรือ i

b)

%f

c)

%lf

d)

%c

9.
  1. "สร้างตัวแปรชื่อ PhiBoon และกำหนดค่า 80 ให้กับตัวแปรนั้น" ข้อใดถูกต้อง

a)

Int myNum = 50

b)

int Phiboon = 80;

c)

int Mynum = 50;

d)

Int PhiBoon = 80;

10.
  1. ถ้าต้องการให้แสดงผลดังรูป ข้อใดถูกต้อง

a)

b)

c)

d)

ถูกทุกข้อ