Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C++ code? #include <stdio.h> #include <math.h> int main () { printf ("%lf", fabs (-10.6) ); return 0; }
Q2
Which header file is required for manipulation of math functions in c++?
Q3
What will be the output of the following C++ code? #include <stdio.h> #include <math.h> int main () { int param, result; int n; param = 8.0; result = frexp (param , &n); printf ("%d \n", param); return 0; }
Q4
Which function is used to join a thread in C++ multi-threading?
Q5
Which header file is used for multi-threading in C++?
Q6
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { char* ptr; unsigned long int a = (size_t(0) / 3); cout << a << endl; try { ptr = new char[size_t(0) / 3]; delete[ ] ptr; } catch(bad_alloc &thebadallocation) { cout << thebadallocation.what() << endl; }; return 0; }
Q7
What is the maximum number of threads that can run concurrently in C++?
Q8
How many Sequence Containers are provided by C++?
Q9
Which of the following is used to avoid race conditions in C++ multi-threading?
Q10
What is the purpose of the 'std::mutex' class in C++ multi-threading?
Q11
Which of the following is a common synchronization primitive in C++ multi-threading?
Q12
What is the Standard Template Library?
Q13
Pick the correct statement.
Q14
What will be the output of the following C++ code? #include <stdio.h> #include <math.h> int main () { double param, result; param = 5.5; result = log (param); printf ("%lf", result ); return 0; }
Q15
Where are standard C libraries defined in C++?
Q16
What will be the output of the following C++ code? #include <stdio.h> #include <math.h> int main () { printf ("%lf", pow (7.0,3)); return 0; }
Q17
What is a race condition in multi-threading?
Q18
What is deadlock in multi-threading?
Q19
How many types of standard exception are there in c++?
Q20
Which of the following is true about thread safety in C++ multi-threading?
Q21
Which of the following have their changes in their declaration related to constness of parameter?
Q22
What is the purpose of the 'std::condition_variable' class in C++ multi-threading?
Q23
Pick out the correct method in the c++ standard library algorithm.
Q24
What is multi-threading in C++?
Q25
What is the purpose of the 'std::thread' class in C++ multi-threading?