answersLogoWhite

0


Best Answer

It's 'const', example:

const double pi = 3.1415926;

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is constant and readonly keyword in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which is the keyword of shell 1.shift 2.readonly 3.unset 4.ls?

answer is ls.. ls is command outside of the unix kernel.. To identify this if you do locate <command> or which<command> you can identify the source of the program.. if you do locate<keyword> or which<keyword>.. you can't identify the source of the program... :)~ss


Is in is used as a keyword in C language?

Neither "in" nor "is" is a keyword in C.


What is the purpose if declaring object with keyword const in c plus plus?

The const keyword transforms a variable into a constant. This means the constant cannot be altered via that constant's identifier. The const keyword can also be applied to a class instance method, such that the method will not alter a class instance's immutable members. Note that the const keyword is merely a programming aid that provides assurances a constant will not be altered inadvertently. However, it is still possible to alter the constant by using a non-constant pointer to the constant. However you have to make a conscious effort to override constant behaviour.


What is meaning of keyword in c language?

'Keyword' is a synonym for 'reserved word', it is not specific to C language.


Whats the difference between static and constant?

The value of a static readonly field is set at runtime; therefore, the value can be modified by the containing class. On the other hand, the value of a const field is set to a compile-time constant. In the case of static readonly, the containing class is allowed to modify the value only: * in the variable declaration (via a variable initializer) * in the static constructor (or instance constructors for non-static)Typically, static readonly is used either when the value is unknown at compile time or if the type of the field is not allowed in a const declaration. Also, instance readonly fields are allowed. Note: for reference types, in both cases-static and instance-the readonly modifier only prevents assignment of a new reference to the field. It does not specifically make the object pointed to by the reference immutable.


What is auto in turbo c?

Keyword.


What is new keyword in c?

enum, void and const are relatively new keywords in Cnew, on the other hand, isn't a keyword in C


What is one keyword you could use to describe a constant variable?

The "Constant" or "Control"I can't think of much else...


What is foreign keyword in java?

There is no "foreign" keyword in Java, however, there is a native keyword that declares native methods in a native language, such as C or C++.For full list of keywords in Java see related question.


Is 'main' a keyword in c language?

No.No.


What is meant by println in c plus plus?

println is not a C++ keyword.


What keyword is used to declare a named constant?

Constant in Java refers to a fixed value that doesn’t change during the execution of a program. The value of constants appears right in a program. It is also known as Literals. We use the constants to create values that assign to variables. Constants can make our program easy to read and understood by others. Java does not directly support the constant. To define a variable as a constant, We use the “Static” and “Final” Keywords before declaring a variable. Hope this helps. Thank you