Saturday, December 31, 2011

It is a triangle array of the binomial coefficients. In this program input value for rows of pascal's triangle.
To get element of particular location by adding upper level(above) left value and above right value.

Sunday, December 25, 2011

Meaning of Platform Independent

It means that a program of java language must be portable to other system. Java program must be run on any hardware, machine and any operating system.Example: java mobile games
Java mobile games runs on any multimedia mobile. When we start a java game on mobile first automatically load java runtime environment. Then mobile able to run java game independently.

Why java is a platform independent language?

Java is platform independent language. When we compile java program then it makes source file to bytecode(class file).

Bytecode is a intermediate form which is closer to machine representation. Bytecode is certain and remain same for all platforms. When compile source code(program.java) is makes bytecode(program.class). Bytecode is faster then source code.
To run bytecode to any platform there is need to load java virtual machine(JVM) interpreter.
Before run java program need JVM must be loaded into particular system. JVM makes java runtime environment into system. Bytecode makes java as platform independent compilation.

Hope, you like this post. If known further details then share to others using comments. :)

Friday, December 23, 2011

It is a basic JAVA program to say to the world "Hello World". It is example for beginners to understand basic java code.
The name Java was derived at a local coffee shop frequented by some of the members and it's related to coffee material.
So In this basic program print Hello WORLD inside the coffee mug.

First install JDK(JAVA Development Kit) with latest version because to run java program need JVM(java virtual machine) when you install JDK then JVM installed in your system.
Java Virtual Machine(JVM) makes JAVA as platform independent.

Save Program
Type the program code in notepad and save Java program with classname.java. In this program save as hello.java.
File name and class name must be same.

Compile Programjavac hello.java
When compile program then it creates bytecode named with hello.class. class file created in same location where program stored.
Bytecode is a code which as same as machine language code.

Exicute the Programjava hello
Now we execute the bytecode in the Java interpreter with using this command.

Friday, December 16, 2011

Hello Friends, here discuss some sample examples related to PL/SQL programming language. These all are basic example to understand PL/SQL syntax.
I used oracle 10g during program development. There are program to understand declare statement, loop concept, procedure, function, exception handling, cursor etc.

Why C is Called Middle Level Language?

C language supports high level language which is user friendly and low level language which is machine friendly.
C combines features of a high level language with the functions of an assembly level language. It reduces the gap between low level language and high level language.
So C language called as middle level language.

C contains many features of high level language like modular programming, user friendly, loop, arrays etc. C language is also related to machine level language(low). It provides features like access to memory using pointers and assembly aspects.
C is one of the language who able to directly interact to system.
C language is used to develop both user applications and operating systems.

Friday, December 2, 2011

Today I am going to share how to perform bubble sort in C programming language.
What is Bubble Sort?
Bubble sort is a very simple sorting algorithm which compares consecutive numbers and swap them if both are not in right order. This gives the biggest element at the end in each inner loop cycle.
Here is an animated example for bubble sort:

Saturday, November 26, 2011

TCP and UDP both are transport layer protocol. They both use for process to process communication. Here I am going to discuss about "Difference Between TCP and UDP Protocols".

What is the Difference Between TCP and UDP Protocols?

1. TCP is a Transmission Control Protocol and UDP is a User Datagram Protocol.

2. TCP is a connection-oriented protocol but UDP is a connection-less protocol.
Connection-oriented means there is first establish connection before transmission and after transmission connection release.
In connection-less there is no need to call setup and call release. There is not send acknowledgement from receiver side so not detection of errors.

3. TCP is a reliable protocol but UDP is a unreliable protocol.

4. TCP packet is called as segment but UDP packet is called as datagram.

5. TCP is used for reliable and large data transfer from source to destination but UDP is used for small message transfer between stations and does not much care about reliability.

6. TCP supports error control but UDP does not support error control.

7. TCP is powerful protocol but UDP is a powerless protocol.

8. TCP is a Heavyweight protocol but UDP is a Lightweight protocol.

9. In TCP, there are control transmission of segment if any segment is loss then retransmit from source to destination but In UDP there is not retransmit loss datagram.

10. In TCP segment transfer in a sequence but In UDP there is not any sequence or order of data transmission.

11. TCP transmission speed is slower than UDP protocol.

Examples: TCP used in WWW, web services, HTTP, FTP, Telnet, IMAP etc.
UDP used in buffering of online audio and video, DNS, online games and other multimedia application where transmission speed matters more than completeness etc.

Program Source Code

#include"stdio.h"#include"conio.h"void main(){int a,b;clrscr();printf("***PRINT LARGEST VALUE AMONG TWO OR MORENUMBER***");printf("Enter the value of a:--");scanf("%d",&a);printf("Enter the value of b:--")scanf("%d",&b);if(a>b){printf("a is greater");}else{printf("b is greater");}getch();}

Program Source Code

#include"stdio.h"#include"conio.h"void main(){int n ;clrscr();printf("\n ***Check 'even' ** or ** 'odd'**** ");printf("\n Enter the number to check:-- ");scanf("%d",&n);if (n%2==0)printf("\n Given no is even:--");elseprintf("\n Given no is odd:--");getch();}

It is a sample C language example. It is a string palindrome program which accept a string from user.
It checks that accepted string is a palindrome string or not. If string or string reverse is as same as then this string is a palindrome string. It means read string same in both forward or backward direction.

Aim - C program to check whether the accepted string is palindrome or not.

Sunday, November 20, 2011

Hi Guys, This it the time of campus recruitment and many final year and pre final year students are looking for resume. Here I am sharing a sample resume for fresher. If you are fresher then this format will help you for initiating your resume. This very simple resume style with all basic details.
Sample Resume for Freshers

It is a sample program example which demonstrate recursion in C programming. It is a factorial program with recursion. Accept number from the user and generate factorial of accepted number using recursion.

Friday, November 18, 2011

It is a sample pl/sql oracle example which have a function cube1 and a program. When a function calls accepted number(no) from user is passed as a argument and output of cube1 function is return value to variable(res).

Aim - PL/SQL program to accept a number from user and display its cube(num^3) value using function.

Function:-
First Execute Function PL/SQL block

create or replace function cube1(no in number) return number IS result number(8);
begin
result:=(no*no*no);
return result;
exception
when no_data_found then
return 'error';
end;

It is a sample PL/SQL Oracle exception handling program to handle errors. It is used for error tolerance and error avoidance.
In Pl/SQL exception is used to handle run time errors. When a run time error occurs then it moves to exception handler block in PL/SQL program.

It is a sample PL/SQL Oracle example using procedure.
When create a procedure IN and OUT keyword used during pass parameters. IN is used to pass values to the procedure and OUT is used to return values to the caller.

It is a basic FOR loop example program which is demonstrate how to use FOR loop in PL/SQL block. FOR loop use in PLSQL is quite differ with C program FOR loop syntax. In PLSQL you should specify the range of integer to execute the sequence of statements.

Wednesday, November 16, 2011

It is a sample plsql example code to find accepted number is even or odd and print output with friendly message.

Even or Odd Number
Even number is a number which is completely divided by 2 and reminder is 0 like 2, 4, 6, 8, 10, ..
Odd number is a number which is completely not divided by 2 and reminder is not 0 like 1, 3, 5, 7, 9, ..

Sunday, September 25, 2011

Hello friends, today I am going to discuss on one type of inheritance in c++. This is "Multipath Inheritance in CPP". Here also discuss about problem in multipath inheritance and how to solve this problem. Multipath Inheritance explains by using a sample c++ example.

What is Multipath Inheritance?

Multipath Inheritance is a hybrid inheritance. It is also called as Virtual Inheritance. It is combination of hierarchical inheritance and multiple inheritance.
In Multipath Inheritance there is a one base class GRANDPARENT. Two derived class PARENT1 and PARENT2 which are inherited from GRANDPARENT. Third Derived class CHILD which is inherited from both PARENT1 and PARENT2.

Problem in Multipath Inheritance

There is an ambiguity problem. When you run program with such type inheritance. It gives a compile time error [Ambiguity]. If you see the structure of Multipath Inheritance then you find that there is shape like Diamond.

Why Ambiguity Problem in Virtual Inheritance?

Suppose GRANDPARENT has a data member int i. PARENT1 has a data member int j. Another PARENT2 has a data member int k. CHILD class which is inherited from PARENT1 and PARENT2. It has a data member int l.
CHILD class have data member
int l(CHILD class data member)
int j( one copy of data member PARENT1)
int k ( one copy of data member PARENT2)int i(two copy of data member GRANDPARENT)

This is ambiguity problem. In CHILD class have two copies of Base class. There are two duplicate copies of int i of base class. One copy through PARENT1 and another copy from PARENT2. This problem is also called as DIAMOND Problem.

Solve Multipath Inheritance Problem

To avoid duplicate copies of class Base we inherited intermediary classes with the prefix of the keyword "virtual". We use virtual keyword so it is also called as "Virtual Inheritance".
This results is avoiding duplicate copies of class Base members and in child class have only one copy of base class members.

Saturday, September 3, 2011

Hello guys, Today I was trying to fix my friends code problem, He was just trying to send email using php which was running on WAMP Server. Then I recollected this details and shared with him. Here is the step by step guide:

Here is the basic java program which will help java beginners.
In every programming language when we initially starts learning,
we always find the "Hello World" program in books.
So in java same program is the first step for you to start with.

Follow by Email

Facebook Page

Hey, If you have other program's and you want to publish here. Please write me at support @100india.com
We will publish your shared example with your name as
'This example is Contribute by: Deepak Kumar'.