3i Infotech Papers: Sample Questions 1099 - 1101 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 1099

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

Explain one method to process and entire string as one unit?

Explanation

  • ‘gets’ allows entering the entire string

Following is the declaration for gets () function.

char * gets (char * str)

  • Str: The pointer to an array of chars where the C string is stored.

  • The function returns str on success, and NULL on error. NULL is also retuned on reaching “end of file” and no characters have been read.

Question number: 1100

» Basic CS » Operating System

Essay Question▾

Describe in Detail

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

Explanation

  • stdarg. h- it defines a variable type va_list and three macros which can get the arguments in a function when the number of arguments are not known i. e. variable number of arguments.

  • A function of variable arguments is defined with the ellipsis (, …. ) at the end of the parameter list.

Below are the argument list function:

  • va_arg

    Fetch argument from variable argument list.

  • va_end

    End processing of variable argument list.

  • va_start

    Start processing of variable argument list.

The argument list function

The Argument List Function

The argument list function

Question number: 1101

» Languages » Java

Short Answer Question▾

Write in Short

What is meant by class loader? How many types are there? Where we will use them?

Explanation

  • Class loader is a part of JVM used to load the classes dynamically and on demand.

  • Different types of class loaders extent base class loader:

    • Bootstrap class loader loads the classes in rt. jar and 8n. jar.

    • Extension class loader loads the class in ext dir.

    • System class loader loads all other classes in the class path.