Thursday, January 21, 2016

Calling main() from main() in c/c++

Many people think that when the main() function call inside the main(), recursion goes on infinite times. But it is not true as such so is it possible to call main() from main inside.?

Yes, we can call the main() within the main() function. The process of calling a function by the function itself is known as Recursion. Well, you can call a main() within the main() function .

The function calls take place until the stack overflow occurs, that is until the stack is completely filled with the functions. This implies that the recursion without a suitable condition takes place not infinite times but stack size times.So that particular experiment when conducted, compiles successfully but it suffers from a run time error or illegal instruction. So you should have a condition that does not call the main() function to terminate the program. Otherwise,the program will never return and run infinitely.

In first example global variable c=0 declared (bcz when main() called is should not reintialized) and after print statement first time it will print 1 (c+1)and condition will true so after calling main it will print 1 now condition will false so program will exit.

#include"stdio.h"
#include"conio.h"
int c=0;
void main(){
       clrscr();
       printf("Before main : %d",c);
       c++;
       if(c<2){
       main();
       exit(0);
       }
       getch();
}

--------------------------------------------------------------------------------------
int main() {
    cout << "Hello World" << endl;
    system("pause");//for pause program execution
    return main();
}


Sunday, September 20, 2015

GOD MODE in windows

How to Use God Mode in Windows 7

Windows 7 is now becoming popular among windows operating system  users.Windows 7 has cool hidden feature ,people calls it godmode in windows 7.GodMode is a folder that brings together a long list of customization settings allowing you to change all your settings from one place.This is very good as you can now change all your windows settings from one single place.

Follow the following steps to create god mode folder:
1. Create a new folder
2. Rename the folder to GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

"You can change name GodMode to any other word you like ANYTHING(i.e.xyz.{ED7BA470-8E54-465E-825C-99712043E01C})"

3.The folder icon will change ,then  double click it to show the GodMode windows options.

That Folder Contains Action Center,Network Configurations,Keybaord-Mouse Management,Device,Display,Homegroup,Bitlocker,Gadgets, in short everything.,

Browse Forum Without Logging

Visit any forum or website to find something useful and they will ask you to register.
All websites and forums will block unregistered users, but they won’t block Google Bot(spider). What we will do is to switch our User Agent to that of Google Bot and freely browse any website or forum without registering.
First grab the User Agent Switcher add-on for Firefox called ‘user agent’ and install it.
Now go to Tools > User Agent Switcher > Options and then again to Options.



Select User Agent from the left sidebar and click Add. Now in the description field type:
crawl-66-249-66-1.googlebot.com
and in user agent field type:
Googlebot/2.1 (+http://www.googlebot.com/bot.html)
as shown in the screenshot below.



Select Google Bot as your User Script by going to Tools > User Agent Switcher.


Now you can browse website or forum without registering.

Unable to Open COS.OBJ File In C

Linker Error:Unable to open File COS.OBJ


This error is also due to the incorrect path of Library Directories. Default path for library is “C:/TC/LIB”. But if you are not installed Turbo C on another location or if you moved the installed TC folder to another, then you have two choices to correct the path. One is move your installed TC folder to you C drive without making a new folder. or change the path of library directory to path of your (installed) library folder (Example: D:/Software/Turbo C/ TC/LIB). Be ensure the LIB folder contains all library files like ‘COS.OBJ’, ‘COT.OBJ’ etc.For set path Follow Steps:
1.Open Turbo c.
2.GoTo Options.
3.Click on Directeries.


Unable to open include files 'IOSTREAM.H'

In Library Directories set the Default path'C:/TC/LIB' or your location(may be not same in all pc, so first you need to check) where LIB folder is located.

Unable to open include files 'C0T.OBJ'

Remove Write Protection Of USB Drive


1.Using CMD

when your USB drive plugged in, launch a command prompt. By searching  cmd.exe in the Start menu .You may need to run Cmd.exe with administrator privileges if you see an “access is denied” message.
In CMD follow This Commands:
diskpart
list disk
>select disk n (n is the number of your USB  drive)
attributes disk clear readonly
clean
create partition primary
format fs=fat32  (you can swap fat32 for ntfs if use the drive with Windows)
exit

2.Using Registry

>run Regedit.exe

Navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Double-click on the WriteProtect value in the right-hand pane of Regedit.exe. Change the Value data from 1 to 0 and click OK to save the change. Close Regedit and restart your computer. Connect your USB drive again, and you should find it is no longer write protected. If you can’t find StorageDevicePolicies, you can try creating a key by right-clicking in the white space in the Control folder and choosing New -> Key and carefully entering the name.Now double-click on the new key (folder) and right-click once again and choose New -> DWORD. Name it WriteProtect and set its value to 0. Click OK, exit Regedit and reboot your computer.

Wednesday, April 2, 2014

Open purely blocked websites.


Open purely blocked websites in your colleges or school or in your office any where, where ever you want even it is blocked tightly.


here the tricks goes like this

Take out the the ip address of the website

Do like this

open run command type cmd
a command prompt will open

type in there

ping (space)the website name

here the example

ping facebook.com

when a line comes "Ping statistics for 69.63.181.12:"  this is facebook's ip address

** if you type the ip address in address bar like this http://69.63.181.12 facebook will open

now open your calculater (window + R ) type calc press enter to reveal the secret

Decimal to  octal form

Convert the ip address which is in decimal form into octal form..

here what to do

type down the ip address

open scientific calculater

select Dec type the first part and then select Oct

and write it down

here is the way

69 = 105
63 = 77
189 = 275
11 = 13

now when you have taken out all values out

now at the address bar type http://0105.077.0275.013    all the values proceeding with 0.


Decimal to  Hexadecimal form

Convert the ip address which is in decimal form into Hex form..

here what to do

type down the ip address

open scientific calculater

select Dec type the first part and then select Hex

and write it down

here is the way

69 =  45
63 =  3F
189 = BD
11 =  0B

now at the address bar type http://0x453FBD0B   the first value proceeding with 0x

** You can do it with any of your favorite website **

##  AND the most simple is use Proxy Server as i told you earlier

TO know about Proxy Server = Click on me

##  You can use google translater

Goto to Google translator = Click on me

type the website name convert it into anyother language and open it simple


## Use anonymizer.ru

to goto the website = Click on me

Track your lost mobile.


Did you ever lost your mobile and found no help from police or mobile operator in tracking your mobile? Well now you don’t need to be worried about it. Now a days each one of us carry Mobile devices and always fear that it may be stolen. Each mobile carries a unique IMEI i.e International Mobile Identity No which can be used to track your mobile anywhere in the world.
This is how it works!!!!!!

Heres' the Secret
*. Dial *#06# from your mobile.

**. Your mobile shows a unique 15 digit .

***. Note down this no anywhere but except your mobile as this is the no which will help trace your mobile in case of a theft.

****. Once stolen you just have to mail this 15 digit IMEI no. to cop@vsnl.net

*****. No need to go to police.

******. Your Mobile will be traced within next 24 hrs via a complex syestem
of GPRS and internet.

*******. You will find where your hand set is being operated even in case your no is being changed.
PASS ON THIS VERY IMP MESSAGE TO ALL YOUR FRIENDS AND RELATIVES.
If u lost your mobile, send an e-mail to cop@vsnl.netwith the following info.
Your name:
Address:
Phone model:
Make:
Last used No.:
E-mail for communication:
Missed date:
IMEI No.:

Calculations On Command Prompt


Tthe command processor CMD.EXE comes with a mini-calculator that can perform simple arithmetic on 32-bit signed integers:

C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9
C:\>set /a "31>>2"
7

Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator.

For more information, type set /? at the command prompt.

Reveal *****(Asterisk) Passwords Using JavaScript.



Want to Reveal the Passwords Hidden Behind Asterisk (****) ?

Follow the steps given below-

1) Open the Login Page of any website. (eg. http://mail.yahoo.com)

2) Type your 'Username' and 'Password'.

3) Copy and paste the JavaScript code given below into your browser's address bar and press 'Enter'.

javascript: alert(document.getElementById('Passwd').value);


4) As soon as you press 'Enter', A window pops up showing Password typed by you..!

HOW TO BLOCK YOUR ENEMY'S SIM CARD ....



Here  a simple method for block your enemy sim card,Blocking a sim card is too simple.What you have to do is just enter the below code in the desired phone
**04*3814*7529*68243#
Entering of above code will ask you to enter the PUK code.To solve this issue just call customer care and get your PUK code.
Note:Entering of invalid PUK will cause permanent blocking of your SIM