Identifier, Variable & Constant

Identifier, Variable & Constant

11th Grade

7 Qs

quiz-placeholder

Similar activities

Python Basics Quiz

Python Basics Quiz

9th - 12th Grade

10 Qs

Arrays Intro

Arrays Intro

9th - 12th Grade

12 Qs

Cues T1 Prog_Base_Datos II 24-25

Cues T1 Prog_Base_Datos II 24-25

11th Grade

10 Qs

Exit Ticket 1/17

Exit Ticket 1/17

9th - 12th Grade

12 Qs

บทที่ 2 การออกแบบวิธีแก้ปัญหา (ชนิดของตัวแปร นิพจน์ และเงื่อนไข)

บทที่ 2 การออกแบบวิธีแก้ปัญหา (ชนิดของตัวแปร นิพจน์ และเงื่อนไข)

9th - 12th Grade

10 Qs

For Loops HW

For Loops HW

9th - 12th Grade

12 Qs

Variable

Variable

11th Grade

10 Qs

Evaluación Programación Piton

Evaluación Programación Piton

9th - 12th Grade

10 Qs

Identifier, Variable & Constant

Identifier, Variable & Constant

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Alvin Muslim Sardar

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is a valid C++ identifier?

  • 2variable

  • variable_name

  • variable-name

  • @variable

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

  • Which of the following is a correct way to declare an integer variable in C++?

int 1number;

integer num;

int number;

num int;

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What keyword is used to define a constant in C++?

constant

const

fixed

static

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you initialize a variable in C++?

int num = 10;

int num : 10;

num = int 10;

int = num 10;

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What will be the output of the following code snippet?

0

5

value

error

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will happen if you try to modify a 'const' variable in C++?

The code will compile successfully

The value will be changed

An error will occur

The program will crash

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following correctly represents a floating-point constant in C++?

3.14

3.14f

3.14F

All correct