Search Header Logo

Session 04: Branching statements

Authored by haibt@rikkei.edu.vn rikkei

Information Technology (IT)

University

Used 60+ times

Session 04: Branching statements
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Từ khóa nào được sử dụng để định nghĩa một câu lệnh if trong C?

else

switch

case

if

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Từ khóa nào được sử dụng để cung cấp nhánh thay thế trong một câu lệnh if?

switch

if

else

case

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Đoạn mã sau sẽ in ra gì: if (0) { printf("True"); } else { printf("False"); }?

True

False

0

1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu lệnh nào sau đây không phải là câu lệnh rẽ nhánh hợp lệ trong C?

if

else

goto

switch case

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cú pháp nào sau đây là đúng cho một câu lệnh switch?

switch { case 1: //code }

switch (expression) { case value: //code }

case (expression) { switch value: //code }

switch case (expression) { value: //code }

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong một câu lệnh switch, từ khóa nào được sử dụng để định nghĩa một khối case?

if

else

case

default

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mục đích của từ khóa default trong một câu lệnh switch là gì?

Để chỉ định trường hợp đầu tiên

Để chỉ định một khối mã để thực hiện nếu không có trường hợp nào khớp

Để chỉ định trường hợp cuối cùng

Để kết thúc câu lệnh switch

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?