When dynamic checking is necessary?

Answer : Dynamic checking is necessary in the following scenarios:

  • Whenever the definition of a variable is not necessary before its usage.
  • When implicit conversion of variables into other types.
  • When the program is to be compiled independently as there is no type checking at compile time.

What are the main differences between Java and C++?

The main differences between Java and C++ are
  • Pointers are supported by C++, where as Java does not pointers.
  • Operator overloading and multiple inheritance are supported by java where as Java does not.
  • Java is a platform independent language, where as C++ depends on different platforms and machines.
  • Java utilizes both compiler and interpreter, where as C++ is only compiler.
  • Java has data type boolean, where as C++ does not.

Define structured programming.

Answer - Structured programming techniques use functions or subroutines to organize the programming code. The programming purpose is broken into smaller pieces and organized together using function. This technique provides cleaner code and simplifies maintaining the program. Each function has its own identity and isolated from other, thus change in one function doesn’t affect other.


Question - Explain Object oriented programming.

Answer - Object oriented programming uses objects to design applications. This technique is designed to isolate data. The data and the functions that operate on the data are combined into single unit. This unit is called an object. Each object can have properties and member functions. You can call member function to access data of an object. It is based on several techniques like encapsulation, modularity, polymorphism, and inheritance.


Question - What is function prototype in C++?

Answer - A function prototype is a declaration of a function that omits the function body. It specifies the function's name, argument types and return type. E.g. int add(int,int)


Question - What are the ways to comment statement in C++?

Answer - C++ supports two types of comments.
/* */ is used for commenting a block of code.
// is used for single line comments.


Question - Define Structure in C++.

Answer - The C++ programming technique allows defining user defined datatypes through structure. The syntax to declare structure is as follows:

struct student
{
char name[100]
char address[250]
};


Question - Define void pointer using C++.

Answer - In C++, void represents the absence of type, so void pointers are pointers that point to a value that has no type. The void pointers can point to any data type.
We can declare void pointer as follows.
Void *p;

Next Part 2


These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati