Tuesday, 7 January 2014

Simple Mail Transfer Protocol (SMTP)

Simple Mail Transfer Protocol (SMTP) is an Internet standard forelectronic mail (e-mail) transmission across Internet Protocol (IP) networks. 
                                                      SMTP was first defined by RFC 821 (1982, eventually declared STD10) and last updated by RFC 5321 (2008) which includes theExtended SMTP (ESMTP) additions, and is the protocol in widespread use today. It is an Application Layer protocol in the OSI reference model.
                       While electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client mail applications typically use SMTP only for sending messages to a mail server for relaying.

Nested loop in c

*  /*program to print this
1
12
123
1234
12345
*/

#include<stdio.h>
main()
{
int i,j;
for(i=1; i<=5; ++i)
{
for(j=1; j<=i; ++j)
{
printf("%d",j);
}
printf("\n");
}
}


/* program to print this
1
22
333
4444
55555
*/

#include<stdio.h>
main()
{
int i,j;
for(i=1; i<=5; ++i)
{
for(j=1; j<=i; ++j)
{
printf("%d",i);
}
printf("\n");
}
}


*    /* Program to print this

    1
   121
  12321
 1234321
123454321
*/

#include<stdio.h>
main()
{
int i,sp=4,j;
for(i=1; i<=5; ++i)
{
for(j=1; j<=sp; ++j)
{
printf(" ");
}
for(j=1; j<=i; ++j)
{
printf("%d",j);
}
for(j=j-2; j>=1; --j)
{
printf("%d",j)
}
printf("\n");
--sp;
}
}

"for" loop in c

/* To print the fibonacci series*/
#include<stdio.h>
void main()
{
int x=1,y=0,z,t,i;
printf("enter number of terms");
scanf("%d",&t);
for(i=1; i<=t; ++i)
{
z=x+y;
x=y;
y=z;
}
}

/* program to check the given number is dracula or not*/
#include<stdio.h>
void main()
{
int num,r,r1,s=0;
printf("enter the number");
scanf("%d",&num);
r=num%10;
num=num/10;
for( ; num>0; num=num/10)
{
r1=num%10;
s=s+r1;
}
if(r==s)
printf("number is dracula");
else
printf("number is not dracula");
}