The declaration is valid in C.It is possible and it is used also in real
time systems.Please refer to the below link:

http://publications.gbdirect.co.uk/c_book/chapter8/const_and_volatile.html

Try running this code on GCC compiler:

#include<stdio.h>
int main()
{

  static const volatile int x;
  printf("%d\n",x);
  return 0;
}

Output is 0 without any error.

const and volatile can be used together with any storage class.

Regards,
Ashish

On Sat, Jun 26, 2010 at 10:48 AM, sharad kumar <aryansmit3...@gmail.com>wrote:

> cos if u declare const u cant change na.but volatile changes na.....so
> practically u cant declare....U cant do mtech at IIT and MBA at IIM at same
> time rite???
>
>
> On Sat, Jun 26, 2010 at 10:43 AM, sharad kumar <aryansmit3...@gmail.com>wrote:
>
>> no its not cos u have declared const and volatile hw is it possible....
>> can u go to IIT and IIM at same time????
>>
>>   On Sat, Jun 26, 2010 at 9:22 AM, sharad kumar <sharad20073...@gmail.com
>> > wrote:
>>
>>> static const volatile int x;
>>> Is the declaration valid
>>> plzzz explain
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algoge...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> yezhu malai vaasa venkataramana Govinda Govinda
>>
>
>
>
> --
> yezhu malai vaasa venkataramana Govinda Govinda
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to