HostGator Coupons

Thursday, February 25, 2010

C Program::Printing U R name without using ; (semicolon)

#include<stdio.h>
void main()
{
           if(printf(" I LOVE THE TERM BINDAS"))
                   {
                   }


}
...............................................................................................................................................................
Note::The if condition should be followed by opening { and the closing } braces , as the the if  condition should be followed by a scope.
I hope u will figure out other ways also, to do it !

Saturday, February 20, 2010

How to run c program in Visual C++ 2008 Express Edition

Steps:
1.Install Visual C++ 2008 Express Edition
2.Click on start button
3.Click All Programs
4. Click Microsoft Visual C++  2008 Express Edition
5Click Visual Studio Tools
6.Click Visual Studio 2008 Command Prompt

7.To Open a File Type:::>   notepad  filename.c
//A notepad will open with a Dialog Box:::Press Yes
8.Write a c program in the notepad and save it.
9.To Compile the File Type:::>  cl  filename.c
10.To Run the File Type:::> filename and press enter //here filename should be without extension .c
Hope u enjoyed it.

Win 7::How to remove the security notification which pops up each time u install a s/w

Steps:
1.Click start button
2.In search bar type user and click Change User Account Control Settings
3.Lower down the notification bar.
4.U have done it baby!
Hope  u Loved it!

How to create an executable java file

coming soon

Restart your friends phone using sms






With this trick only 1110,1110i,1112,1100,2100 can be restarted.




just type


,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


or 79 inverted commas


in text msg and send it to ur friend having cells mention above and see wat happens

How to add Desktop as bookmark in the mozilla browser or any.....

Hope u liked it.

C program which deletes itself

Source Code::::::::
#include <stdio.h>
int main(void)
{
   char file[80];

   /* prompt for file name to delete */
   printf("File to delete: ");
   gets(file);              //Here enter the name of the file to delete,it can be the name of  this file also

   /* delete the file */
   if (remove(file) == 0)
      printf("Removed %s.\n",file);
   else
      perror("remove");

   getch();
   return 0;
}
This program is tested in Turbo c 3

ILLUSION:::C PROGRAM WITHOUT main()


Source code::::
#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");
}
output:::::
HELLO


The TRICK::::::::
 Here we r using preprocessor directive #define with arguments to give  an impression that the program runs without main.But in reality it runs with a hidden main function
The ## is called token merging operator.So the logic is when u pass  (s,t,u,m,pe,d ) as arguments to decode(2nd line)  it merges the 4th ,1st,3rd and 2nd character which thus converts decode(a,n,i,m,a,t,e) into main which again replaces begin with main.
Hope u enjoyed it.


Printing 1 to 10 without using a loop:::::::::

Source Code::::::
#include<stdio.h>
#include<stdlib.h>
void main()
{
static int i; // static variable is initialized to 0
i++;
if(i==11)
exit(0);
printf("%d\n",i);
main();
}

Output:::::::
1
2
3
4
5
6
7
8
9
10
-------------------------------------------------------------

Hope u enjoyed it................


free counters