MCQOPTIONS
Bookmark
Saved Bookmarks
→
C++ Programming
→
Constructors And Destructors in C++ Programming
→
How many parameters are available in srand functio..
1.
How many parameters are available in srand function?
A.
4
B.
3
C.
2
D.
1
E.
None of these
Answer» B. 3
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <ctime><br> #include &ltcstdlib><br> using namespace std;<br> int main()<br> {<br> srand((unsigned)time(0));<br> int ran;<br> int L = 11, H = 100;<br> int R = (H - L) + 1;<br> for(int k = 0; k < 1; k++)<br> {<br> ran = L + int(R * rand() / (RAND_MAX + 1.0));<br> cout << ran << endl;<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"> #include <cstdlib><br> #include <ctime><br> #include <iostream><br> using namespace std;<br> int main()<br> {<br> srand((unsigned)time(0));<br> int num;<br> for (int k = 0; k < 2; k++)<br> {<br> num = (rand() % 10) + 1;<br> cout << num;<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"> #include <iostream><br> #include <stdio.h><br> #include <stdlib.h><br> #include <time.h><br> int main ()<br> {<br> srand (time(NULL));<br> printf ("Random number is: %d n", rand() % 50);<br> srand (1);<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <complex><br> using namespace std;<br> int main()<br> {<br> complex<double> Comp_double(4, 6);<br> complex<int> Comp_int(7, 8);<br> Comp_double *= 2;<br> Comp_double = Comp_int;<br> cout << Comp_double;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <complex><br> using namespace std;<br> int main() <br> {<br> complex<double> Comp1(3.0, 9.0), Comp2;<br> Comp2 = pow(Comp1, 2.0);<br> cout << Comp2;<br> return 0; <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <complex><br> using namespace std;<br> int main ()<br> {<br> complex<double> Comp (10.0, 4.0);<br> cout << imag(Comp) << endl;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <complex><br> using namespace std;<br> int main()<br> {<br> complex<double> CompNum1(2.0, 4.0);<br> complex<float> CompNum2(polar(3.0, 0.25));<br> cout << (CompNum1 += sqrt(CompNum1)) << endl;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <limits><br> using namespace std;<br> int main( )<br> {<br> cout << numeric_limits<short int> :: max() << endl;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <limits><br> using namespace std;<br> int main () <br> {<br> cout << boolalpha;<br> cout << numeric_limits<int> :: has_infinity << ' n';<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <functional><br> #include <numeric> <br> using namespace std;<br> int Accumulator (int n, int m) <br> {<br> return n - m;<br> }<br> int Product (int n, int m) <br> {<br> return n + m;<br> }<br> int main () <br> {<br> int p = 150;<br> int Array1[] = {12, 22, 33};<br> int Array2[] = {11, 12, 13};<br> cout << inner_product(Array1, Array1 + 3, Array2, p ,Accumulator, <br> Product);<br> cout << endl;<br> return 0;<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply