Many C learner face the problem of initializing a variable with binary value or assign a integer variable with binary values. Don't worry its very easy as described in C you can use 0x for hex, 0 for octal similarly 0b defines binary. for example if you want to assign binary 1101 (i.e 13) to variable. then use this
int var = 0b1101;
Popular Posts
-
If you are trying to send your own data (i.e user defined data) over a network in ns2 then you might have tried different function of Packe...
-
A recent problem has been popped up in chrome, since some time they don't allow user to set cookie for domain localhost. So if you are ...
-
Most of the times peoples don't always like to reach office or other machines where actual work is done. Suppose you have a very high re...
-
Suppose i have a code which need to reference static variable so we have following code in trial.h class Trial { static int v; void set...
-
One of the most easiest way to install ns2 is to download ns-allinone package. So download ns-allinone-2.34.tar.gz. now follow these steps. ...
-
Many C learner face the problem of initializing a variable with binary value or assign a integer variable with binary values. Don't worr...
-
Programmer who take part in some kind of big code needs to generate patch files. Begginers do get trouble here as how to create, there is si...
Total Pageviews
Friday, June 17, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment