Thank you for adding the error message you are getting to your post. I am fixing an error I made in my original post. I also have some additions based on some stuff I located with the help of Google.
First, I have come to the conclusion that the code you posted is not code that you wrote. It appears to be taken from the book "Let Us C" by Yashavant Kanetkar. It is almost identical to the code in an edition of the book that I found online - even including a clear (typographical?) error in the code.
Just before the code in the book, the author writes "Throughout this discussion of bitwise operators we are going to use a function called showbits( ), but we are not going to show you the details of the function immediately."
What this means is that the book author wrote a function he named showbits(). He uses this function in most (all?) of the examples in that chapter and they will not work without it, but he doesn't provide or explain that code until 20 pages later at the end of the chapter.
So, if you look ahead in the book, you will find the code for the showbits() function. I haven't read the book, but since this is 500 pages into it, hopefully you know how to use a function in addition to main() in your program. If not, you might need a better book. (I have the impression that is not a good one.)
I will add that the showbits() code in the edition of the book that I saw presumes that an int is 16 bits. This is not necessarily true. I think it is 32 bits in VC 6.0, so you will want to practice your programming and fix up that function.
In addition, you did ask:is there any problem in following program
Looking at the program, one line really stands out:
This is an infinite loop instruction. Yes, that is what is printed in the book. It is, however, a mistake. You can practice your programming by figuring out the problem and fixing it.
Note also that main() should be defined as returning int. It is true that the book that you are using does not do that. That does not mean that you shouldn't, it means you should get a better book. Writing function definitions that implicitly return int rather than explicitly specifying the return type was done in K & R C. This practice has not been appropriate for new code for over 20 years.
This touches on CPallini's wondering why you aren't getting a compiler error for the use of showbits() without a function prototype. First, you are trying to learn C and using a C Compiler, not C++. As long as it is C and not C++ that you intend, this is fine. Second, you are (unknowingly) exploiting the allowance in the compiler for pre-standard K & R syntax. This is a BAD BAD BAD idea and has been for over 20 years. You should turn up the warning level on the compiler and then you should start getting warnings about this. The book you are using seems to be inconsistent on this issue. You should strive to consistently get it right. Perhaps you should consider finding a better book.