What is the primary difference between a variable and a named constant in C++?

What will be an ideal response?


A variable is a memory location whose value can change (vary) during runtime.  A named constant is a memory location whose value cannot be changed during runtime.

Computer Science & Information Technology

You might also like to view...

Solutions with a pH in the bottom half of the pH scale are ____.

A. neutral B. acidic C. basic D. non-polar

Computer Science & Information Technology

The balance factor of a node in an AVL tree is

a) the number of nodes below it b) the number of nodes above it c) the height of its right subtree minus the height of its left subtree d) the depth of the node from the root e) always positive

Computer Science & Information Technology

Consider the following list.list = {24, 20, 10, 75, 70, 18, 60, 35}Suppose that list is sorted using the insertion sort algorithm as discussed in the book. What is the resulting list after two passes of the sorting phase; that is, after three iterations of the for loop?

A. list = {10, 18, 20, 24, 75, 70, 60, 35} B. list = {10, 20, 24, 75, 70, 18, 60, 35} C. list = {10, 18, 20, 24, 35, 70, 60, 75} D. list = {10, 20, 20, 18, 35, 70, 60, 75}

Computer Science & Information Technology

Sidebars can contain functionality offered by the blogging application, such as ____.

A. searching the blog B. leaderboard ads C. banner ads D. accessing its archives

Computer Science & Information Technology