Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions

Previous < 1 2 2 3 4 5 > Next

C and C++ (INTERVIEW QUESTIONS) 2
  What is assignment operator?

  Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy)

   
  What are all the implicit member functions of the class? Or what are all the functions which compiler implements for us if we don't define one.?

  default ctor
  copy ctor
  assignment operator
  default destructor
  address operator

 
  What is conversion constructor?

  constructor with a single argument makes that constructor as conversion ctor and it can be used for type conversion.
for example:
 class Boo
  {
  public:
  Boo( int i );
 };
 Boo BooObject = 10 ; // assigning int 10 Boo object

 
  What is conversion operator?

  class can have a public method for specific data type conversions.
for example:
 class Boo
  {
  double value;
  public:
  Boo(int i )
  operator double()
  {
  return value;
  }
 };
 Boo BooObject;
  double i = BooObject; // assigning object to variable i of type double. now conversion
  operator gets called to assign the value.

 
  What are C++ storage classes?

 auto: the default. Variables are automatically created and initialized when they are defined and are destroyed at the end of the block containing their definition. They are not visible outside that block
 register: a type of auto variable. a suggestion to the compiler to use a CPU register for performance
 static: a variable that is known only in the function that contains its definition but is never destroyed and retains its value between calls to that function. It exists from the time the program begins execution
 extern: a static variable whose definition and placement is determined when all object and library modules are combined to form the executable code file. It can be visible outside the file where it is defined.

 
  What is reference?

  Reference is a name that acts as an alias, or alternative name, for a previously defined variable or an object. prepending variable with "&" symbol makes it as reference.
for example:
  int a;
  int &b = a;

 
  When do use "const" reference arguments in function?

 a)Using const protects you against programming errors that inadvertently alter data.  b) Using const allows function to process both const and non-const actual arguments, while a function without const in the prototype can only accept non constant arguments.
 c) Using a const reference allows the function to generate and use a temporary variable appropriately.

 
  What is Memory alignment?

  The term alignment primarily means the tendency of an address pointer value to be a multiple of some power of two. So a pointer with two byte alignment has a zero in the least significant bit. And a pointer with four byte alignment has a zero in both the two least significant bits. And so on. More alignment means a longer sequence of zero bits in the lowest bits of a pointer.

 

Previous < 1 2 2 3 4 5 > Next

  Copyright 2000-2006 © SoloScript.com, All rights reserved.