Wednesday, October 12, 2011

How to check Full Text search is installed in your sysem SQL Server2008?

select SERVERPROPERTY('IsFullTextInstalled')


if this query returns 1 then its installed , if it returns 0 then its not installed.

Tuesday, October 11, 2011

Copy a file to another file by creating implicity

#include
main( )
{
FILE *fp,*fw ;
char ch,ch1 ;
fp = fopen ("C:\pr1.txt", "r" ) ;
fw = fopen ("C:\pr2.txt","w");
while(1)
{
ch=getc(fp);
fputc(ch,fw);
if(ch==EOF)
break;
}
}

Tuesday, July 12, 2011

Bitwise XOR Operator

A number XORed with the another number twice will give the original number.I tried this sample program in Linux and it working fine.

#include
void main()
{
int i=23,j;
i=i^50;
printf("\nAfter 1st shift the value of i = %d\n",i);
i=i^50;
printf("\nAfter 2nd shift the value of i = %d\n",i);
if(i==23)
printf("\nInitial value= Final Value ---> SUCCESS\n");
else printf("\nSOMETHING WRONG IN THE PROGRAM\n");
}


The output will be

After 1st shift the value of i = 37

After 2nd shift the value of i = 23

Initial value= Final Value ---> SUCCESS

Thursday, July 7, 2011

Sorting in C - Descending

Same as the previous program just to change the condition in the if the statement.

if(a[i]<=a[j])----->if(a[i]>=a[j])

You will get the output.

#include
#include
int main()
{
int i,j,temp;
int a[5]={-123,34,14,87,45};
printf("SORTING PROGRAM IN DESCENDING\n");
for(i=0;i<5;i++)
{
for(j=i+1;j<5;j++)
{
if(a[i]>=a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
} for(i=0;i<5;i++)
printf("%d\n",a[i]);
getch();
}

Sorting in C - By Ascending

And finally i come up with a basic of C programmer for new buddies.Hope it might be useful.

I had given 5 values in the array to be simple.

#include
#include
int main()
{
int i,j,temp;
int a[5]={-123,34,14,87,45};
printf("SORTING PROGRAM IN ASCENDING\n");
for(i=0;i<5;i++)
{
for(j=i+1;j<5;j++)
{
if(a[i]<=a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
} for(i=0;i<5;i++)
printf("%d\n",a[i]);
getch();
}

Monday, July 26, 2010

Why i created blog?How it will be useful to me?Why to create a blog?


Welcome to Im Learner.Further i dont know what i can do and what i should do?All suggestions are valuable to start with any concept here.I"m seriously thinking what i should start posting here(regarding which feild).Share your ideas with me to keep going.Thanks