Computer Science

No Comments

Association , Aggregation and Composition

Association “Association represents the static relationship shared among the objects of two classes. “So any relationship between object of two classes is called association. An association says there is some kind of dependency between the objects. It can either be a weak or Strong dependency. Consider an example of Teacher and Student classes. Multiple students […]

No Comments

Introduction to Automapper

Introduction AutoMapper is an object-object mapper. Object-object mapping works by transforming an input object of one type into an output object of a different type. When to use Automapper? Here is one Sample scenario. Assume we have a domain model say a Customer entity and we are planning to show a list of Customers in […]

No Comments

3-Tier Architecture in .NET

3-Tier architecture generally contains User Interface (UI) or Presentation Layer, Business Access/Logic Layer (BAL) and Data Access Layer (DAL).

No Comments

Comments in C language

Comments are merely program documentation which helps the reader to understand the code. The compiler ignores these comments when it translates the program into executable code. C language uses two different formats of comment 1. Block comment 2. Line comment 1. Block comment: A block comment is used when the comment will span several lines. […]

23 Comments

General Structure of C program

Basic Structure of a C program contains following sections, Documentation Section Link Section Definition Section Global Declaration Section main() { Declaration Section Executable part } Subprogram section Function 1 Function 2 . . function n The Documentation Section consists of a set of comment lines giving the name of the program and other details. The […]

2 Comments

Binary Search

A binarysearch program locates the position of an item in a sorted array. Logic: The Binary search starts by testing the element at the middle of the array. Let us consider an array ‘a’ with all elements arranged in ascending order. Let low and high are the lower and upper indices of the array ‘a’, respectively. We want to search an item […]

11 Comments

Introduction to PCI protocol

Today’s computer systems, with their emphasis on high resolution graphics, full motion video, high bandwidth networking, and so on, go far beyond the capabilities of the architecture that ushered in the age of the personal computer in 1982. Modern PC systems demand high performance interconnects that also allow devices to be changed or upgraded with […]

194 Comments

Insertion sort in C program

Here is the program to sort the given integer in ascending order using insertion sort method. Please find the pictorial tutor of the insertion sorting. Logic : Here, sorting takes place by inserting a particular element at the appropriate position, that’s why the name-  insertion sorting. In the First iteration, second element A[1] is compared […]

76 Comments

Bubble sort program in C

Here is the program to sort the given integer in ascending order using bubble sort method. Please find the pictorial tutor of the bubble sorting. Logic :  The entered integers are stored in the array A. Here, to sort the data in ascending order, any number is compared with the next numbers for orderliness. i.e. […]

3 Comments

Mouse programming in C

Mouse can be used in text mode as well as in graphics mode. Usually it is used in graphics mode. Hence we must first change over to graphics mode. In our program the function initgraph() is responsible for switching the mode from text to graphics .DETECT is a macro defined in ‘graphics.h’. It requests initgraph() […]