In raspberry pi , we got two famous libraries (a) bcm2835 and (b)wiringpi. So,I want to use some header files from library bcm2835 and some from wiringpi in a same code. Is it possible to do so. If so, what should be the format for compiling my code?
I think that the format should be C/C++. If I'm right, the bcm2835 library can be used in C and C++ code. About wiringpi I'm not sure. And about your question, it's possible to mix the two libraries for different purpose. You can try, you can't broke anything.
But, I have a question! If I'm right, both libraries are for controlling the GPIO pins. Why do you want to mix these libraries when both give you almost the same or the same features? I think, that it would be better if you choose the library that fits to your needs, is light and you can implement your ideas easily. So you'll have to see which of these two fits better to your needs and what is your effort to implement your ideas if you use one of those 2 libraries.
I think it's not needed to use both because you'll just increase the size of your executable and also, is useless to use same features from 2 different libraries.