WorksheetsC++ Programming
Total questions: 40
Worksheet time: 32mins
Name
Class
Date
1.
Before a computer can understand a program it must be...
a)
Translated into its machine code.
b)
Translated into a high level language.
c)
Translated into a low level language.
d)
Converted into binary.
2.
A list of instructions that enable a computer to perform a specific task is a...
a)
Computer Program
b)
Algorithm
c)
Machine Code
d)
Binary Code
3.
When writing a computer program most program use...
a)
A High Level Language
b)
A Low Level Language
c)
A Machine Code
d)
An Algorithm
4.
A language that requires no knowledge of the hardware or the instruction set of the computer is called...
a)
A High Level Language
b)
A Low Level Language
c)
Machine Code
d)
An Algorithm
5.
A language that is close to human language and which is easy to write, debug and maintain is known as...
a)
A High Level Language
b)
A Low Level Language
c)
An Algorithm
d)
Machine Code
6.
Languages that relate to the architecture and hardware of a specific computer are known as...
a)
High Level Languages
b)
Low Level Languages
c)
Simplex Languages
d)
Complex Languages
7.
What is the only thing that computers understand?
a)
Machine Code
b)
Low Level Languages
c)
High Level Languages
d)
Algorithms
8.
Which type of translator creates an executable file of machine code from a program written in a high level language?
a)
Compiler
b)
Assembler
c)
Interpreter
d)
Executor
9.
ข้อใดไม่ใช่คุณสมบัติของ compiler
a)
แปลภาษามนุษย์เป็นภาษาเครื่อง
b)
หาก code ผิด จะไม่ทำงาน
c)
สามารถแปลที่ละบรรทัดได้
d)
หลังจากแปลเสร็จจะได้ไฟล์นามสกุล .obj
10.
ส่วนใดของโปรแกรม เริ่มทำงานก่อน
a)
ส่วนหัวของโปรแกรม
b)
ส่วนฟังก์ชั่นหลัก
c)
ส่วนรายละเอียดของโปรแกรม
d)
ส่วนคอมไลเลอร์
11.
ส่วนใดของโปรแกรม คือส่วนทีนักเรียนต้องเขียนโค๊ดลงไป
a)
ส่วนหัวของโปรแกรม
b)
ส่วนฟังก์ชั่นหลัก
c)
ส่วนรายละเอียดของโปรแกรม
d)
ส่วนคอมไลเลอร์
12.
Which command moves the shown text to the next line?
a)
\t
b)
\n
c)
\r
d)
\s
13.
Which of the following is initializing a variable that allows only whole numbers?
a)
string_t house;
b)
int house;
c)
array house;
d)
double house;
14.
Which of the following is initializing a variable that allows words?
a)
string_t house;
b)
int house;
c)
array house;
d)
double house;
15.
After running the following code, what will be the value of x?
y = 3;
x = 5 * y;
y = 3;
x = 5 * y;
a)
3
b)
5
c)
15
d)
0
16.
A programmer is:
a)
person who writes code and communicates instructions to a computer
b)
person who types
c)
person who studies computers
d)
error or mistake in your code
17.
Can hold an unknown number:
a)
variable
b)
string
c)
integer
d)
array
18.
Can hold an unknown word:
a)
variable
b)
string
c)
integer
d)
array
19.
Code is the:
a)
order of events
b)
instruction given to a computer by a programmer
c)
paragraphs
d)
language written by humans to communicate with computers
20.
What sign is used to end the code sentence ?
a)
,
b)
.
c)
:
d)
;
21.
How do we declare(present) a variable ?
a)
int a;
b)
int a
c)
int ;
d)
a ;
22.
Where do we write the codes?
a)
1
b)
2
c)
3
d)
4
23.
What is the output of this program?
Program
int main()
{
cout<<"Hi everybody";
return 0;
}
Program
int main()
{
cout<<"Hi everybody";
return 0;
}
a)
"Hi everybody"
b)
Hi everybody"
c)
Hi everybody
d)
"Hi everybody
24.
What is the output of the program?
a)
Ict Profi
b)
IctProfi
c)
Ict
Profi
Profi
d)
Profi
Ict
Ict
25.
Which one has correct codes to calculate your age?
Note : Your birth year will be int the birth variable
Note : Your birth year will be int the birth variable
a)
cout << "Your age is equel to "<<2017-birth;
b)
cout << "Your age is equel to "<<2017-birth
c)
cout << "Your age is equel to 2017-birth";
d)
cout << "Your age is equel to "<<birth;
26.
Which of the following is the correct operator to compare two variables?
a)
:=
b)
=
c)
equal
d)
==
27.
what is the symbol used to multiply?
a)
%
b)
&
c)
*
d)
/
28.
ข้อใดเป็นลักษณะของภาษาระดับสูง
a)
ทำงานได้โดยไม่ต้องมีโปรแกรมระบบ
b)
มีภาษาใกล้เคียงกับภาษามนุษย์
c)
เป็นภาษาคอมพิวเตอร์ยุคใหม่
d)
เป็นภาษาที่ใช้กับงานขั้นสูง
29.
ถ้าต้องการเก็บข้อมูลเกรดเฉลี่ยของเพื่อน ควรกำหนดชนิดตัวแปรเป็นแบบใด
a)
char
b)
int
c)
short
d)
float
30.
ข้อใดเป็นโปรแกรมสำหรับพัฒนาโปรแกรมภาษาซี
a)
Logo
b)
Dev-C++
c)
Pascal
d)
NotePad
31.
ข้อใดเป็นลักษณะของภาษาระดับสูง ?
a)
ทำงานได้โดยไม่ต้องมีโปรแกรมระบบ
b)
มีภาษาใกล้เคียงกับภาษามนุษย์
c)
เป็นภาษาคอมพิวเตอร์ยุคใหม่
d)
เป็นภาษาที่ใช้กับงานขั้นสูง
32.
ข้อใด ไม่ใช่ กิจกรรมที่ต้องทำในการกำหนดและวิเคราะห์ปัญหา
a)
เขียนผังงาน
b)
กำหนดรูปแบบของผลลัพธ์
c)
กำหนดข้อมูลนำเข้า
d)
กำหนดตัวแปรที่ใช้
33.
การเลือกภาษาคอมพิวเตอร์เพื่อใช้ในการเขียนโปรแกรม ต้องคำนึงสิ่งใด ?
a)
ความถนัดของผู้เขียน
b)
ข้อจำกัดของเครื่องคอมพิวเตอร์ที่ใช้
c)
ประเภทของงาน
d)
ถูกทุกข้อ
34.
คำสั่ง if...else ใช้เมื่อต้องการกำหนดอะไรในขั้นตอนวิธี
a)
กำหนดเงื่อนไข
b)
กำหนดการรับข้อมูลเข้า
c)
กำหนดกระบวนการ
d)
ผิดทุกข้อ
35.
ในกระบวนการพัฒนาโปรแกรม กระบวนการใดสำคัญและต้องเอาใจใส่ มากที่สุด
a)
การวิเคราะห์ปัญหา
b)
ออกแบบขั้นตอนวิธี
c)
เขียนโปรแกรม
d)
ทดสอบโปรแกรม
36.
A person who writes code and communicates instructions to a computer.
a)
Code
b)
Programmer
c)
Command
d)
Program
37.
Language written to communicate with computers, language that gives instructions to computers.
a)
Loops
b)
commands
c)
Bugs
d)
Code
38.
Non-numerical and is used to store characters and words.
a)
Integer
b)
Double
c)
Boolean
d)
String
39.
Value either false or true.
a)
Integer
b)
Double
c)
Boolean
d)
String
40.
What is the only thing that computers understand?
a)
Machine Code
b)
Low Level Languages
c)
High Level Languages
d)
Algorithms
100 %
