answersLogoWhite

0


Best Answer

The const keyword is the antonym of variable. While a variable is a volatile identifier and can change its value at any time, a constant identifier is non-volatile and must be assigned a value at the point of instantiation. Whenever you declare a constant you are allowing the compiler to assure you that the value will never change, whether purposely or by programming error. By allowing the compiler to assure constance, you do not need to manually check if the value has been altered. As with many other things in C++, the more responsibility you hand to the compiler, the more robust your programs will be.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Theres a few... Some of them are:

int

char

double

float

long

short

unsigned

signed

bool

for

do

while

if

else

return

using

namespace

typedef

template

typename

and

break

case

switch

class

const

default

enum

false

true

or

private

public

sizeof

This is not all C++ keywords!

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

A keyword in any computer language is a reserved word. What this means is that you cannot declare a user-defined name using a keyword -- they are exclusive to the language itself. In C++, all keywords and user-defined names are case-sensitive, so while you cannot declare the name 'virtual' because it is a keyword, you can declare the names such as 'Virtual', 'VIRTUAL', ViRtUaL, and so on. However, to avoid any chance of confusion, it's best to avoid using names that resemble keywords.


Keywords in C++ include all names with a double underscore or that lead with an underscore followed by an uppercase letter, as well as all of the following major keywords:


  • alignas (since C++11)
  • alignof (since C++11)
  • and
  • and_eq
  • asm
  • auto
  • bitand
  • bitor
  • bool
  • break
  • case
  • catch
  • char
  • char16_t (since C++11)
  • char32_t (since C++11)
  • class
  • compl
  • const
  • constexpr (since C++11)
  • const_cast
  • continue
  • decltype (since C++11)
  • default
  • delete
  • do
  • double
  • dynamic_cast
  • else
  • enum
  • explicit
  • export
  • extern
  • false
  • final (since C++11)
  • float
  • for
  • friend
  • goto
  • if
  • inline
  • int
  • long
  • mutable
  • namespace
  • new
  • noexcept (since C++11)
  • not
  • not_eq
  • nullptr (since C++11)
  • operator
  • or
  • or_eq
  • override (since C++11)
  • private
  • protected
  • public
  • register
  • reinterpret_cast
  • return
  • short
  • signed
  • sizeof
  • static
  • static_assert (since C++11)
  • static_cast
  • struct
  • switch
  • template
  • this
  • thread_local (since C++11)
  • throw
  • true
  • try
  • typedef
  • typeid
  • typename
  • union
  • unsigned
  • using
  • virtual
  • void
  • volatile
  • wchar_t
  • while
  • xor
  • xor_eq
This answer is:
User Avatar

User Avatar

Wiki User

11y ago

It has various meanings depending on the context.

A virtual method in a base class implies the method may be overridden by a derived class, in which case calling that method on the base class calls the method in the most-derived class that implements that method. This is achieved via the virtual table (v-table), so there is no need to determine the actual type of the derived class at runtime.

A pure-virtual method in a base class implies the class is abstract and must be derived from, and that a derivative must implement the method (or it becomes abstract itself). You cannot instantiate abstract classes. They are intended purely to provide a common interface to their derivatives.

A virtual base class is a class that is common to two or more derived classes that may be combined in a multiple-inheritance class. If the derived classes declare the base class virtual, the derived classes will share the same instance of the base class, and the multiple-inheritance class will inherit just one instance of the base class from those derived classes. If the derived classes do not declare the base class virtual, the derived classes have separate instances of the base class, which inevitably leads to an ambiguity in the multiple-inheritance class.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Keywords are words that are reserved by C++ and cannot be used as variable names, function names or user-defined data types. Keywords convey special meaning when used in code. The following are examples of reserved keywords:

int

void

friend

class

struct

if

else

while

do

If you want to know all the keywords in C++, see related links, below.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

It is hard to say exactly because some vendors of C++ compilers introduce more keywords. At least 74 keywords are available as a minimum number.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

To overload an operator. ie to write operator functions

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How many keywords in c plus plus and what are they?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Turbo C plus plus keywords?

Turbo C++ keywords are the same as C++ keywords. The language remains the same, only the implementations differ. The Turbo C++ implementations were standards-compliant at the time of their release, but the product is no longer supported.


How many keyword are present in C?

32 keywords are present in C language. There are 44 keywords in C99.


How many keywords does c language have?

32


How many keywords in C language?

32


Which word is reserved in c plus plus?

All C++ keywords are reserved, as are all variable and function names that begin with two leading underscores.


Is it possible to declare a keyword as an identifier in c plus plus?

No. Keywords are reserved and cannot be used as identifiers. However, C/C++ is case-sensitive. So although register is a reserved keyword, Register is not.


How many keywords are there in c?

answer:32 programme to print factorial of a given number in c languages


What is the difference between c language and c plus plus in computers?

C++ supports object-oriented principals whereas C does not. C has 34 keywords while C++ has an additional set of 32 keywords, most of which relate to object-oriented programming, while others are synonymous for operators, such as 'and_eq' (same as &=) and 'not' (same as !). Other than that they are largely the same. Most C programmes will compile under C++ without major modification. Some minor syntax differences need to be catered for, but the syntax is largely the same for both.


How may keywords in c?

15


How much keywords in c?

25


How do you count the no of keywords in c?

1. Get the list of the keywords. 2. Use your fingers to count.


What is the identifiers in turbo c?

all keywords