3i Infotech Papers: Sample Questions 1244 - 1245 of 1245

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

Question number: 1244

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

What is NULL Micro? What is the difference between a NULL pointer and a NULL Macro?


  • Macro is used for defining a constant value to a constant reference.

  • Null macro is defining 0 to NULL.

Bellow it is defined:

#define NULL 0;

Difference between a NULL pointer and a NULL Macro

Difference between a NULL pointer and a NULL Macro

NULL pointer

NULL macro

A pointer which has 0 or NULL value points to points to memory location

Defined in stdio. h and stddef. h.

Not be confused with an uninitialized pointer.

Is used to represent a null pointer in code.

Question number: 1245

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is namespace?


Understanding of namespace.

Understanding of Namespace.

Understanding of namespace.

  • Namespace is declarative region providing a scope to the identifiers inside.

  • Namespace break code into logical groups to prevent name collisions especially when code includes multiple libraries.

Define Namespace:

namespace namespace_name


// code declarations


To access namespace of other function prepend (: : ) the namespace as follows:

Name: : code; // code could be variable or function.