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, ..

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'.