Question

Please can someone write me this program head.

#include-bits/stdc++.h> using namespace std;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

It is basically a header file that also includes every standard library and stl include file. So if we #include <bits/stdc++.h> in a C++ program then there is no need to include any other header files.

Its just a header file which also includes all other standard libraries and stl header files. I myself personally use it to avoid extra #includes and compiler errors which may sometimes arise due to missing header files. However, it includes too much stuff which is mostly not used at all and also adds to compilation time. Thus, also executable file created using bits/stdc++.h has slightly higher size than without it, although difference is negligible.
you can compile below two codes and compare the size of the two executables.

#include<bits/stdc++.h>

using namespace std;

int main() {

               int x = 0;

               cout << x;

               return 0;

}

#include<iostream>

using namespace std;

int main() {

               int x = 0;

               cout << x;

               return 0;

}

Add a comment
Know the answer?
Add Answer to:
Please can someone write me this program head. #include-bits/stdc++.h> using namespace std;
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT