You are here:

C/showbits function

Advertisement


Question
can i use showbits() in c under linux.

Answer
Dear Mr Satheesh !

The function you have mentioned ( showbits() is not a standard C/C++ Function )
 There are different type of C Compiler available in markets today which includes ( 16bit C / C++ Compiler eg , Turbo C++ 3.0 32bit C/C++ Compiler Eg Microsoft Visual c++ 6.0 And so on ) So major difference between these two compiler besides the features  is size of data it handles , ( In a 16 bit compiler  the size of an integer is 2 byes whereas in a 32 bit compiler size of an integer is 4 bytes of course 32 bits ) so the size of an integer varies depends on the environment,  but There is yet another option to overcome this problem is just to check out the size of the integer before using the showbit() function .
     Hope i have already presented a code for this function in compatible with 16bit environment ,  No problem it will work pretty fine in Linux environment, only thing you have to do is to extend/alter the code in compatible with linux environment !

Thanks and regards!
Prince M. Premnath

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Prince M. Premnath

Expertise


I'm sure that I can solve any doubts in Turbo C ,Graphics Programing ,Mouse, Hardware Programming ,File System ,Interrupts, BIOS handling , TSR Programming , General Concepts in C Language, handling inline Assembly statements

Experience

Research over 6+ Years

Organizations
CG-VAK Softwares and Exports Limited

Education/Credentials
Masters in Computer Applications

©2012 About.com, a part of The New York Times Company. All rights reserved.