EXCEPTION HANDLING IN CPP

  EXCEPTION HANDLING Introduction   An exception is an indication of a problem that occurs during a program's execution. The name "exception" implies that the problem occurs infrequently if the "rule" is that a statement normally executes...

DEVELOPING A “C PROGRAM”

The  program development process includes three important stages,  namely, program design, program coding & program testing.  All three stages contribute to the production of  high quality programs. Here we shall discus about program coding...

Programming Tutorial

  First starting with c++ prerequisite for this is c some guys get books of deep c i hopeThis tutor designed for noobs so anybody who knows c++ well just keep quiet and dont show off ur...... etccci go slowly one chapter per day starting some...

Some Library functions in C Part 2

String Manipulation function strcat          appands one string to another strchr          finds first occurence of a given character in string strcmp       compares two strings strcmpi      compares two strings without regard to...

Some Library functions in C

Arithmetic functions abs   returns absolute value of the integer cos   calculates cosine cosh  calculates hyperbolic cosine exp     raises the exponential e to the xth power fabs    finds absolute value floor    find largest integer less than...

Call C function from C++ program

/*////////////////////////////////////*/#include #include /* Prototype of the C++ function. */int SizeArray(void); /*////////////////////////////////////*//* The compare function for qsort().  *//*////////////////////////////////////*/static int...

Array of string pointers

#include // Array of string pointers to be sorted.static const char* brothers[] ={    "Frederick William",    "Joseph Jensen",    "Harry Alan",    "Walter Ellsworth",    "Julian Paul"}; // Linkage specification.extern "C"{    // Prototype of C...

Display time

////////////////////////////////////////#include #include ////////////////////////////////////////// The first version of display_time().////////////////////////////////////////void display_time(const struct std::tm* tim){    std::cout

String copy function in c++

////////////////////////////////////////#include ////////////////////////////////////////// The first version of string_copy().////////////////////////////////////////void string_copy(char *dest, const char* src){    while((*dest++ = *src++) !=...

An inline function.

#include #include ////////////////////////////////////////// An inline function.////////////////////////////////////////inline void error_message(char* s){    std::cout

////////////////////////////////////////#include // Prototypevoid show(int = 1, float = 2.3, long = 4); ////////////////////////////////////////// The main() function.////////////////////////////////////////main(){    show();              // all...

Function prototype

////////////////////////////////////////#include // Function prototype.void ErrorMsg(); ////////////////////////////////////////// The main() function.////////////////////////////////////////int main(){    // Call the function.   ...

Type Conversion

////////////////////////////////////////#include ////////////////////////////////////////// The main() function.////////////////////////////////////////int main(){     // Three uninitialized variables, different types.     char myChar;     short...

Conditional Operator in C++

#include ////////////////////////////////////////// The main() function.////////////////////////////////////////int main(){    float Dues;      // dues amount     // Read the dues.    std::cout > Dues;     // Are the dues paid on time?   ...

Increment and Decrement Operator in c++

#include ////////////////////////////////////////// The main() function.////////////////////////////////////////int main(){    int Ctr, OldCtr, NewCtr;     // Make the assignments    OldCtr = 123;      // OldCtr is 123    NewCtr = ++OldCtr; //...

Assignment and Expression

////////////////////////////////////////// The main() function.////////////////////////////////////////int main(){    // Declare three integers.    int HourlyRate;    int HoursWorked;    int GrossPay;     // Assign values to the integers.   ...

Some basic codes of data structures

I would like to share my codes of data structures in c and c++ 1st program is for the addition and multiplication of two polynomials#include#include#define MAX 10void initialise(int[]);void addition(int[],int[],int[],int);void...

Understanding how compiler was developed

Hello everyone, This is my first article on this site however there are lots of computer related articles which I have written for other resources. I would like to show you story behind compiler design and also why hardware prices is coming down...

what is data structure?

A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the...

C Program to compare two numbers.....

This program takes two numbers as inputs and compares them to show which one is greater.   #include                                                             // Header file #include                                                           //...

Powered by CjBlog