const keyword
-
Hi, I am new to this forum>plz let me know which forum is suitable for 'C' language. And my question is - What are the possible ways of writing C codes using 'const' keyword. I have written some.I need few more. Plz go thru and send me any other cases where we can use const keyword in C only not C++.Hope I will get reply as early possible. const int degrees = 360; int const degrees1 = 180; const float pi = 3.14; const char quit = 'q'; int * const var1; const int * var2; int const * var3 const char * const Var4; char const * const Var5; void test1() const; const int * test2(); /* function returns a adress that could not be modified */ void test3(const int *i); const int arr1[]={1,2,3,4,5,6,7}; char const *arr="coderzone"; typedef struct member { char name[20]; long phno; }; const struct member M1 = {"Marino" , 62627000}; struct member * const M2 = {"John" , 2786900}; const struct member * const M3 = {"Smith",57361777}; union single { int I1; char C1; }; const union single S1 = {97}; union single * const S2 = {'A'}; const union single * const S3 = {'0'}; Thank U..
-
Hi, I am new to this forum>plz let me know which forum is suitable for 'C' language. And my question is - What are the possible ways of writing C codes using 'const' keyword. I have written some.I need few more. Plz go thru and send me any other cases where we can use const keyword in C only not C++.Hope I will get reply as early possible. const int degrees = 360; int const degrees1 = 180; const float pi = 3.14; const char quit = 'q'; int * const var1; const int * var2; int const * var3 const char * const Var4; char const * const Var5; void test1() const; const int * test2(); /* function returns a adress that could not be modified */ void test3(const int *i); const int arr1[]={1,2,3,4,5,6,7}; char const *arr="coderzone"; typedef struct member { char name[20]; long phno; }; const struct member M1 = {"Marino" , 62627000}; struct member * const M2 = {"John" , 2786900}; const struct member * const M3 = {"Smith",57361777}; union single { int I1; char C1; }; const union single S1 = {97}; union single * const S2 = {'A'}; const union single * const S3 = {'0'}; Thank U..
There is nothing better than a paper and ink bounded book to learn C or in that case any programming language. To start with C please use the The C Programming Language by Schaum Series and move onto The C Programming Language by Dennis Richie and Brian W Kerningham, Pearson Education Publication. But if you still insist on online Sites, best would be to Google the keyword and choose the best site upto your understanding.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
-
Hi, I am new to this forum>plz let me know which forum is suitable for 'C' language. And my question is - What are the possible ways of writing C codes using 'const' keyword. I have written some.I need few more. Plz go thru and send me any other cases where we can use const keyword in C only not C++.Hope I will get reply as early possible. const int degrees = 360; int const degrees1 = 180; const float pi = 3.14; const char quit = 'q'; int * const var1; const int * var2; int const * var3 const char * const Var4; char const * const Var5; void test1() const; const int * test2(); /* function returns a adress that could not be modified */ void test3(const int *i); const int arr1[]={1,2,3,4,5,6,7}; char const *arr="coderzone"; typedef struct member { char name[20]; long phno; }; const struct member M1 = {"Marino" , 62627000}; struct member * const M2 = {"John" , 2786900}; const struct member * const M3 = {"Smith",57361777}; union single { int I1; char C1; }; const union single S1 = {97}; union single * const S2 = {'A'}; const union single * const S3 = {'0'}; Thank U..
what is the final goal behind this question please ?
const
only means that the variable/object to which it is declared cannot be modified once initialized.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]