C Interview General Utilities Online Exam Quiz

C Interview General Utilities GK Quiz. Question and Answers related to C Interview General Utilities. MCQ (Multiple Choice Questions with answers about C Interview General Utilities

What is the function of the void *realloc(void *str, size-t size);?

Options

A : allocates space for an array of str objects, each of whose size is size

B : allocates space for an object whose size is specified by size and whose value is indeterminate

C : changes the size of the object pointed to by str to the size specified by size

D : causes the space pointed to by str to be deallocated, that is, made available for further allocation

View Answer

Which among the given function causes abnormal program termination ?

Options

A : exit()

B : abort()

C : atexit()

D : getenv()

View Answer

Which function searches an environmenr list that are provided by the host environment?

Options

A : getenv()

B : system()

C : srand()

D : rand()

View Answer

The ________ function returns no value.

Options

A : malloc()

B : realloc()

C : free()

D : calloc()

View Answer

void free(void *ptr) deallocates the memory previously allocated by a call to _______ ________ or _________

Options

A : malloc,getenv,abort

B : calloc,malloc,exit

C : calloc,malloc,realloc

D : exit,getenv,abort

View Answer

Which of the given statement is true with respect to the function atexit()?

Options

A : The atexit() function cannot return to its caller

B : The atexit() function is used to return zero if the registration succeeds, nonzero if it fails

C : The atexit() function returns no value

D : The atexit() function causes abnormal program termination to occur

View Answer

The behavior is undefined if more than one call to the exit function is executed by a program.

Options

A : true

B : false

C :

D :

View Answer

What is returned by the function if the space cannot be allocated by the function malloc(), realloc() and calloc()?

Options

A : value

B : error

C : null pointer

D : no value

View Answer

Chemical Engineering Basics - Part 1 more Online Exam Quiz

C Endianness

C General Utilities

C Inline

C Interview Dangling Pointers

C Interview Date Time Function

C Interview Mathematical Functions

C Interview String Operations

C Library Multiple Choice

C Localization

C Multiple Choice Character Handling