Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Keywords less used


  • Please log in to reply
13 replies to this topic

#1 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 11 June 2008 - 04:07 AM

In c, there are some keywords the usage of which is not very clearly defined (in textbooks). But they are an important part of the language. Here are some I could find ::

Volatile::


The keyword volatile is used to specify that the value of a variable can be changed explicitly by a program even in the same expression where no external or explicit change is made in the value of the variable by the program. This, explicit specification of volatility is important because c automatically assumes a variable on the right side of an expression to have a constant value, and refers to that value if future for the same statement.
Thus
d=a+b+c+a*a+d;

will have same values of ‘a’ throughout by default. This is an implicit optimization of all modern compilers. This can also overcome problems of changing compilers, which differ in evaluation rules for expressions.
This is very helpful for ports, which have values that can be changed by external conditions only.

Static ::


1. Static local variables ::
#include<stdio.h>
 
int ret()
{
static int aa;
return aa++;
}
main()
{
int a;
for(i=0;i<10;i++)
{
printf("%d ",ret());
}
getch();
}
In this code, the initial value of ‘aa’ is retained each call. Thus we get the numbers from 0 to 9 as output, even though the declaration of ‘aa’ takes place along with the function.


Know further here :: Keywords less used | TECHARRAZ
  • 1

God is real... unless declared an integer

my blog :: http://techarraz.com/


#2 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 11 June 2008 - 04:11 AM

Excellent Read! +rep given.
  • 0

#3 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 12 June 2008 - 09:18 AM

Your blog is really coming along, Chinmoy! ;)
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#4 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 12 June 2008 - 10:04 PM

Thanks Xav. My alexa rank is 2,383,611 for a 1 week average, and 11,771,264 for 3 months average, although my blog is up only around 10 days!

techarraz.com - Traffic Details from Alexa
  • 0

God is real... unless declared an integer

my blog :: http://techarraz.com/


#5 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 13 June 2008 - 09:44 AM

That's pretty good - I'm at 6,239,619, but then again I haven't SEOd or anything.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#6 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 13 June 2008 - 10:47 PM

That means you need only some slight amt. of management to get somewhere good!
  • 0

God is real... unless declared an integer

my blog :: http://techarraz.com/


#7 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 14 June 2008 - 10:52 AM

Serious? But my site is the most useless personal site in existence! That can't be right!
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#8 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 14 June 2008 - 12:12 PM

What did you build your website for? Just to learn and write about yourself for family members? My first website was similar. I had a single HTML page just talking about Linux and myself. I was using Slackware 3.x at the time and I don't believe PHP had been invented (at least I hadn't heard of it).
  • 0

#9 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 14 June 2008 - 12:47 PM

My website's just somewhere to host files, stuff like that. No biggie.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#10 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 15 June 2008 - 07:03 AM

Cmon Xav, with your knowledge of c#, you can do that anytime! I think you should start a coding site seriously! Or a blog maybe!
And good news is, My alexa rank for weekly average has moved into 1,469,171! Waiting to see the 3 months average! Will have to wait three months for that..
And i guess my thread is not the best place to discuss this. Can we start a new thread to discuss our websites?
  • 0

God is real... unless declared an integer

my blog :: http://techarraz.com/


#11 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 15 June 2008 - 08:55 AM

Good idea. You start it. :)

And what's my knowledge of C# got to do with my website? You can't write sites in C#, unless you use something like ASP.NET. I'm thinking about what to put on my site.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#12 Chinmoy

Chinmoy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 365 posts

Posted 15 June 2008 - 10:47 PM

Database management! I thought c# was good for that!
  • 0

God is real... unless declared an integer

my blog :: http://techarraz.com/





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download