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. Operation between an integer and float always yields a float result.
  2. What is C Tokens?
  3. Each pass through a loop is called a/an
  4. What's wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
  5. Which header file is essential for using strcmp() function?
  6. Every if statement can be converted into an equivalent switch statement.
  7. Which of the following shows the correct hierarchy of arithmetic operations in C
  8. The main() function can be called from any other function.
  9. For 16bit compiler allowable range for integer constants is ______ ?
  10. p++ executes faster than p + 1.
  11. Which of the following expressions is wrong
  12. Structures within structures cannot be created.
  13. Which of the following is the most preferred way of throwing and handling exceptions?
  14. The printf() function retunes which value when an error occurs?
  15. Which of the following language is predecessor to C Programming Language?
  16. enum helps to create user defined datatype.
  17. What would be the output of the following program?int x=40;main(){int x=20;printf("%d",x);}
  18. The output of the following code is: main() {int a = 5, b = 6; (a == b? printf("%d", a)); }
  19. How many times the following loop will execute?for (a = 0; a < 4; a++)printf("hello");
  20. C programs are converted into machine language with the help of
  21. The output of the following code is: main() { xyz: goto abc;printf("Hello"); abc: printf("World");goto…
  22. Single operations involving entire arrays are permitted in C.
  23. fopen() function returns a pointer to the open file.
  24. In the expression - 'x + y + 3z =20'
  25. The output of the following code is: main() {int a[10], i; for (i = 1; I <= 0; i++) {scanf("%d",…
  26. Union is used to hold different data at different time.
  27. Right shifting an operand 1bit is equivalent to multiplying it by 2.
  28. Which of the following is not a preprocessor directive
  29. The output of the following code is: void main(){ int a = 20;printf("%d\t%d", ++a, a);}
  30. emp name' is a valid variable name.