• Main Menu
  • Programming

    • Java Method

      Java Method

      Java Method is very much similar to a normal method or a function written within a class definition. Java method is basically a set of statements group together to perform a specific task. This method is included in a class. An object instantiated from a class can call methods of that class. Every Java method

    • Java Data Types

      Java Data Types

      Data types in the Java programming language are basically divided into two groups – primitive data types and object references. A primitive data type is a basic building block and has full built-in support. Many other languages also support composite data types, which are build on a combination of primitive data types and may or

    • Postfix

      Postfix

      The sum of X and Y is written as X+Y where + is the operator while X and Y are the operands. We have always learnt to write the sum of two numbers as X + Y; this notation is know as infix. Here, we’ll be talking about the postfix notation of representing arithmetic operations.

    • Function Templates

      Like class templates, we can also define function templates that could be used to create a family of functions with different argument types. The general format of a function template is as follows: template <class T> return-type function-name( argument of type T ) { // body of function with Type T } The function template

    • Pointers

      Pointers

      A pointer is a variable that holds the memory address, usually a location of another variable in memory. The use of pointers is critical for the successful programming in C++. The three reasons that support this are, Pointers provide the means through which the memory location of a variable can be directly accessed and hence

    • Type Conversion – Class to Basic Type

      Type Conversion – Class to Basic Type

      The constructor handles the task of converting basic types to class types very well. But you cannot use constructors for converting class types to basic data types. Instead, you can define an overloaded casting operator that can be used to convert a class data type into a basic data type. The general form of an

    • File Input/Output

      File Input/Output

      In C++, file input/output services are implemented through a component header file available in the C++ standard library. This header file is fstream.h . In C++, a file, at its lowest level, is interpreted simply as a sequence, or stream, of bytes. One aspect of the file I/O library manages the transfer of these bytes.

    • Shell Sort

      Shell Sort

      Invented by Donald Shell in 1959, Shell sort is the most efficient of the O(n2) class of sorting algorithms. It is also the most complex of the O(n2) algorithms. This algorithm is similar to bubble sort in the sense that it also moves elements by exchanges. Shell sort begins by comparing elements that are at

    • Operator Overloading – Introduction

      Operator Overloading – Introduction

      Operators like + (plus), – (minus), * (multiply), / (divide) work very well with data types such as int, float, etc. But when it comes to user defined data types these operators do not work on their own. To make them work, we need to define special functions that tell the operators how to handle

    • Exception Handling

      Exception Handling

      There are two kinds of exceptions, namely, synchronous exceptions and asynchronous exceptions. Errors such as “out-of-range index” and “over-flow” belong to the synchronous type exceptions. The errors that are caused by events beyond the control of the program (such as keyboard interrupts) are called asynchronous exceptions. The proposed exception handling mechanism in C++ is designed

    programming
    } 411 queries in 0.639 seconds.