Which of the following statements does not allocate a block of 100 bytes and test for an allocation failure?

A. if (ptr = malloc(100))
B. if (!(ptr = malloc(100)))
C. if (ptr = calloc(100))
D. if (!(ptr = calloc(100)))
E. if (ptr = realloc(100))


Answer: B

Computer Science & Information Technology

You might also like to view...

The program that you write to test a function is called a(n) ______________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What is the Last Known Good Configuration?

What will be an ideal response?

Computer Science & Information Technology

In a ________ relationship, a record can match several records in the second table and a record in the second table can match several records from the first table:

A) multiple B) many-to-many C) compound D) several-to-several

Computer Science & Information Technology

The primary function of ___________________________________ is to turn an unreliable network into a reliable network that is free from lost and duplicate packets.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology