0
Why does the rand() happens to be different?
I'm learning C++ but one question Why is this code #include <iostream> #include <cstdlib> using namespace std; int main() { cout << rand(); } Is different in the output that Sololearn did
3 Antworten
+ 2
It returns random value😃
https://www.sololearn.com/learn/CPlusPlus/1638/?ref=app
If you want to know the algorithm behind it. just reply me
+ 1
Roneel is right,it will generate any random number so it will always differ when compiled
..
0
Thanks guys it really appreciated