Home

When is std::bad_alloc exception thrown?

A. When new operator cannot allocate memory

B. When alloc function fails

C. When type requested for new operation is considered bad<  thisexception is thrown

D. When delete operator cannot delete teh allocated (corrupted) object

Please do not use chat terms. Example: avoid using "grt" instead of "great".

You can do it
  1. Which of the following shows the correct hierarchy of arithmetic operations in C
  2. The identifier argv[] is a pointer to an array of strings.
  3. Which of the following is not a preprocessor directive
  4. The output of the following code is: void main(){int z, a = 5, b = 3; z = a * 2 + 26 % 3;printf("%d",…
  5. Which classes allow primitive types to be accessed as objects?
  6. p++ executes faster than p + 1.
  7. It is necessary to initialize the array at the time of declaration.
  8. Which of the following correctly describes C++ language?
  9. Which header file is essential for using strcmp() function?
  10. fopen() function returns a pointer to the open file.
  11. the value *(&i) is same as printing the value of address of i.
  12. Bitwise operators can operate upon?
  13. The-------------------- statement helps immediate exit from any part of the loop
  14. No commas or blanks are allowed within an integer or a real constant.
  15. Union is used to hold different data at different time.
  16. Which of the following is not true about preprocessor directives
  17. Which of the following is not a standard exception built in C++.
  18. What does STL stand for?
  19. The output of the following code is: main() {int a = 0; for (; i = 0; i++) printf("%d", a); }
  20. Which of the STL containers store the elements contiguously (in adjecent memory locations)?
  21. What's wrong? while( (i < 10) && (i > 24))
  22. Which of the following is a valid destructor of the class name "Country"
  23. The expression (i + j)++ is illegal.
  24. Which of the following is invalid?
  25. The contents of a file opened in 'r+' mode cannot be changed.
  26. Character data types cannot be declared as unsigned.
  27. Which of the following is not recommended in a header file?
  28. fprintf()function can be used to write into console.
  29. The output of the following code is: void main() { static int a = 1, b, c;if (a>=2) b=2; c=3;printf("%d\t%d",…
  30. The output of the following code is: void main() {int a = 1, b=2; int *ip; ip=&a; b=*ip; printf("%d",…