How to Configure SMTP in asp .NET? ,Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher
How to Configure SMTP in asp .NET?

This example specifies SMTP parameters to send e-mail using a remote SMTP server and user  that are importent. This program shows configuration process-

<system.net>

<mailSettings>

<smtp 

deliveryMethod=\"Network|PickupDirectoryFromIis|SpecifiedPickupDirec>

<network 

defaultCredentials=\"true|false\"

from=\"r4r@fco.in\"

host=\"smtphost\"

port=\"26\"

password=\"password\"

userName=\"user\"/>

<specifiedPickupDirectory 

pickupDirectoryLocation=\"c:pickupDirectory\"/>

</smtp>

</mailSettings>

</system.net>

More interview questions and answers

#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }

main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }

main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }

main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }

void pascal f(int i,int j,int k) { printf("%d %d %d",i, j, k); } void cdecl f(int i,int j,int k) { printf("%d %d %d",i, j, k); } main() { int i=10; f(i++,i++,i++); printf(" %d\n",i); i=10; f(i++,i++,i++); printf(" %d",i); }

main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

What are anonymous structure, unions and what are their uses?

main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

What is the difference between char str, char *str and char* str ?Explain the meaning of char* or int* ?

Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }

typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

void main() { if(~0 == (unsigned int)-1) printf("You can answer this if you know how values are represented in memory"); }

int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }

main() { char *p = "ayqm"; printf("%c",++*(p++)); }

main() { int i=5; printf("%d",++i++); }

main() { char *p = "ayqm"; char c; c = ++*p++; printf("%c",c); }

While copying the objects if we say X a=b, X a(b) What will it call, assignment operator or copy constructor? Justify

int aaa() {printf("Hi");} int bbb(){printf("hello");} iny ccc(){printf("bye");} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }

main() { int i=5; printf("%d",i=++i ==6); }

What are the disadvantages of C++?

main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }

void ( * abc( int, void ( *def) () ) ) ();

Explain why encapsulation is required?

main() { while (strcmp("some","some\0")) printf("Strings are not equal\n"); }

main() { char str1[] = {"s","o","m","e"}; char str2[] = {"s","o","m","e","\0"}; while (strcmp(str1,str2)) printf("Strings are not equal\n"); }

What are Polymorphic Classes?

main() { int i = 3; for (;i++=0;) printf("%d",i); }

What is public, protected, private?

void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf("%d",*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf("%d",*cptr); }

void main() { static int i; while(i<=10) (i>2)?i++:i--; printf("%d", i); }

main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

What is virtual class and friend class?

1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.

What do you mean by pure virtual functions?

main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }

What is the diffrence between static_cast and dynamic_cast in RTTI

main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }

What is a fake pointer?

What is importance of const. pointer in copy constructor?

What is the difference between a pointer and a reference?

What is Smart Pointer?

How to Configure SMTP in asp .NET?

Print Hello World message using SharePoint in Asp.Net 2.0?

How to create a SharePoint web part using File upload control.give example?

What is BulletedList Control in Share Point. Give an example?

DescribeWizard server control with example in Share Point?

Define Life Cycle of Page in ASP.NET?

Write a program in ASP.NET to Show Data With Access?

Write a program to show connection with Oracle in ASP.NET?

Write a program to show connection to Excel in ASP.NET?

How to add Record in ASP.NET?

Write a program to Delete Record in ASP.NET ?

Write a program to show data in Gridview in ASP.NET?

Write a Program to Connect with dropdownlist in ASP.NET

How Repeater is used in ASP.NET?

How to show data in HTML table using Repeater?

Write a program to show the Use of dataList in ASP.NET?

How to make User Control in ASP.net?

main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }

#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf("The dimension of the array is %d", DIM(arr, int)); }

int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf("The dimension of the array is %d", DIM(arr)); }

main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j),*(*(j+p)+i),*(*(i+p)+j), *(*(p+j)+i)); } }

main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }

main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }

#include main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr

Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }

main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }

There were 10 records stored in "somefile.dat" but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen("somefile.dat","r"); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }

Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])

What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++

What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }

What is the hidden bug with the following statement?

What is the hidden bug with the following statement? assert(val++ != 0);

void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }

#define assert(cond) if(!(cond)) \(fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\__FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }

Is the following code legal? struct a { int x; struct a b; }

Is the following code legal? struct a { int x; struct a *b; }

Is the following code legal? typedef struct a { int x; aType *b; }aType

Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

void main() { printf("sizeof (void *) = %d \n", sizeof( void *)); printf("sizeof (int *) = %d \n", sizeof(int *)); printf("sizeof (double *) = %d \n", sizeof(double *)); printf("sizeof(struct unknown *) = %d \n", sizeof(struct unknown *)); }

char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)

Which version do you prefer of the following two, 1) printf("%s",str); // or the more curt one 2) printf(str)

What is Operator overloading?

What is the difference between run time binding and compile time binding?

What is Difference Between C/C++?

What is Difference Between C/C++

R4R provides free online tutolrails ,examples for Freshers and experts .We cover core java, tutorials, spring, Hibernate, python, struts, struts 2,c language, spring boot,PHP,MYSQL,C#,ASP.NET,WPF,WCF,Photoshop , JSP, programming, example, Interview questions and answer