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

You can do it
  1. There are total ------ numbers of operators in 'C'.
  2. The output of the following code is: int f(int a, int b); void main() {int a = 12, b=154; printf("%d",…
  3. printf("%d", sizeof('2')); will print 2.
  4. Which of the following is a valid destructor of the class name "Country"
  5. Right shifting an operand 1bit is equivalent to multiplying it by 2.
  6. The expression 'int j = 6 + 3 % -9;' evaluates to -1.
  7. The output of the following code is: void main() {int a = 0; while (a<=50) for(;;) if(++a % 50==0)…
  8. Left shift operator rotates the bits on the left and places them to the right.
  9. gets() and puts() are unformatted I/O functions.
  10. struct stud{int roll;char name[20];float marks;} *p;What will be the byte size of p?
  11. The main() function can call itself recursively.
  12. The expression (i + j)++ is illegal.
  13. What does STL stand for?
  14. void' is a datatype.
  15. What is the right way to access value of structure variable book{ price, page }?
  16. Which of the following language is predecessor to C Programming Language?
  17. printf() is not a library function.
  18. Which of the following is allowed in a C Arithmetic instruction
  19. What's wrong? while( (i < 10) && (i > 24))
  20. The output of the following code is: void main(){int z, a = 5, b = 3; z = a * 2 + 26 % 3;printf("%d",…
  21. Which of the STL containers store the elements contiguously (in adjecent memory locations)?
  22. When is std::bad_alloc exception thrown?
  23. The expression "int i = j = k = 0;" is invalid.
  24. A declaration float a, b; occupies ___ of memory
  25. Which of the following shows the correct hierarchy of arithmetic operations in C
  26. enum helps to create user defined datatype.
  27. Which of the following is invalid?
  28. What will be output if you will compile and execute the following c code? #include int main(){ int i=320;…
  29. What is Keywords?
  30. The output of the following code is: main() { void msg() { printf("HELLO WORLD"); } }