C++ Online Test Questions

Select Series

The first argument to be supplied at command-line must always be count of total arguments.

It is necessary to call the macro va_end if va_start is called in the function.

Can I increase the size of dynamically allocated array?

va_list is an array that holds information needed by va_arg and va_end

malloc() allocates memory from the heap and not from the stack.

The keyword used to transfer control from a function back to the calling function is

Which standard library function will you use to find the last occurance of a character in a string in C?

Even if integer/float arguments are supplied at command prompt they are treated as strings.

How will you free the allocated memory ?

In a file contains the line "I am a boy\r\n" then on reading this line into the array str using fgets(). What will strcontain?

The library function used to find the last occurrence of a character in a string is

Bit fields CANNOT be used in union.

Data written into a file using fwrite() can be read back using fscanf()

The modulus operator cannot be used with a long double.

Which header file should you include, if you are going to develop a function, which can accept variable number of arguments?

A preprocessor directive is a message from programmer to the preprocessor.

In a function two return statements should never occur.

A pointer union CANNOT be created

It is necessary that a header files should have a .h extension?

A structure can contain similar or dissimilar elements