Saturday, November 2, 2013

Introduction To OpenMP

INTRODUCTION This manual documents the usage of libgomp, the GNU implementation of the Openmp. Application Programming Interface (API) for multi-platform shared-memory parallel programming in C/C++ and Fortran. 1.Enabling OpenMP To activate the OpenMP extensions for C/C++ and Fortran, the compile-time flag -fopenmp must be specified. This enables the OpenMP directive #pragma omp in C/C++ and !$omp directives in free form, c$omp, *$omp and !$omp directives in fixed form, !$ conditional...

Sunday, March 31, 2013

Linked List Implementation Of Stack

The linked list is generally pictured as a list of linear nodes that are tethered together somehow. In C/++, you generally have a structure which contains data and a pointer to the next structure container which contains data and a pointer to the next structure container... and so on. The linked list's main advantage is that it doesn't contain data in a contiguous way and rather, a flexible way. This allows for fast insertion and better overall...

CPU Date And Time

In this post I'll tell how to store your cpu date and time in a text file . For this purpose we will be using "time.h" header file ... CPU time and date is nothing but the date you see when you log into into your OS.... This is helpful to keep log of activities on your C++ applications... Program: #include "iostream"#include "iomanip.h"#include "fstream.h"using namespace std; int main(){    system("color ce");   ...

Character Pyramid

Character pyramid algoritm is generally based on its the ascii values of the characters. The American Standard Code for Information Interchange (ASCII) is a  character-encoding  scheme originally based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many additional characters. Here...

Array Implementation Of Stack

Stacks data structures refer to the lists stored and accessed in a special way, where LIFO (Last In First Out)technique is followed. In stacks ,insertion and deletions (PUSH and POP) take place only at one end , called top.Stack is similar to a stack of plates. The plates are inserted or removed only from the top of the stack. Program: #include<iostream>#include<windows.h> using namespace std;#define MAX 100using namespace std;struct...

Array Implementation Of Queue

The queue works on the principle of first in first out...FIFO.. , where insertion takes place at the "rear" end of the queues and deletions take place at the "front" end of the queues.Queue is much and same as a line of people waiting for their turn to vote.First person will be the first to vote and a new person can join the queue , at the rear end of it.... Program: #include<iostream>#define MAX 100using namespace std; class Queue{              ...

Wednesday, March 20, 2013

Row Swap Of A Matrix

In row swap operation the rows of the matrix is swaped............. i.e., the rows are interchanged................ Program: #include<iostream>#include<iomanip>#include<windows.h>using namespace std;int main(){                            system("cls");                           ...