Friday, May 30, 2014

Basic Sytanx of C

Some basic commands you should know while writing program in C .
Let write a C program which prints a line of text.

#include<stdio.h>
int main()
{
printf("This is my first C program");
return 0;
}

stdio.h

While writing program in C you should start with #include<stdio.h>.
This is header file, "stdio" means standard input output header. 

Printf

In C language "printf" command is used to display any message on screen.

scanf

In C language scanf is used to accept the user input from the keyboard. The command of scanf is :
scanf("%d",&base).
Let us take an example. We write a program that will calculate area of triangle and display the answer.
#include<stdio.h>
int main()
{
float area,base,height;
printf("n\Program to calculate the area of triangle");
printf("n\nPlease enter the value of base :")
scanf("%f",&base);
printf("Please enter the value of Height:")
scanf("%f",&height);
area=0.5*base*height;
printf("\n\nHeight=%f",height);
printf("\nBase=%f",base);
printf("\n0.5*Height*Base=Area");
printf("\n0.5*%f*%f=%f\n",height,base,area)'
return 0;
}

"%d" is used for integer data type.
"%f" is used for float data type.
"%c" is used for character data type.
"%s" is used for string data type.

Some other commands to remember

\n

\n is new line character. So whenever you want a newline you have to add a \n.

\t

\(horizontal tab) Moves the active position to the next horizontal tabulation position on the current line.

\a

is alert/bell

How TO Install JDK on Windows

  1. Download the latest version of the *Java JDK from Sun Microsystems.
  2. Install the Java Software Development Kit Step 2.jpg

    Double-click on the install file and it should open an installer (Fig. 1).
  3. Install the Java Software Development Kit Step 3.jpg
    3
    Click next, then read and accept the license.
  4. Install the Java Software Development Kit Step 4.jpg

    On the next screen you will encounter some options. Just leave these alone and click next unless you know what you are doing. (Because this is being read it is assumed that you do not.)(Fig. 2)
  5. Install the Java Software Development Kit Step 5.jpg

    The next page you encounter should install (and in some cases download) the Java Development Kit. (Fig. 3)
  6. Install the Java Software Development Kit Step 6.jpg

    After the installer is finished, open run by clicking Start > Run... or by typing Windows Key + R.
  7. Install the Java Software Development Kit Step 7.jpg

    In the text box, type "cmd" and click "OK".
  8. Install the Java Software Development Kit Step 8.jpg

    A simple window should be opened with a black background and a text prompt. This is called the "Command Prompt." My command prompt background is red, but it could really be any color. (Fig. 4)
  9. Install the Java Software Development Kit Step 9.jpg

    After focusing the window, type "javac" and press enter. If the prompt returns something along the lines of: "'javac' is not recognized as an internal or external command, operable program or batch file" then continue with the next step. If it shows many more options and lines, skip to step 15.
  10. Install the Java Software Development Kit Step 10.jpg

    Open the properties of "My Computer" by either right-clicking the icon on the desktop or right-clicking Start > My Computer. When the pop up menu opens, scroll to the bottom and select "Properties".
  11. Install the Java Software Development Kit Step 11.jpg

    This should open a window named "System Properties". Click on the "Advanced" tab and then click "Environment Variables". (Fig. 5)
  12. Install the Java Software Development Kit Step 12.jpg

    Next, another window opens with a lot of confusing sentences and letters. Double-click on the "Path" variable on either of the option boxes. It is recommended to edit the variable in the box "User variables for (your username)".
  13. Install the Java Software Development Kit Step 13.jpg

    Once the variable is opened, a text box in yet another window appears. Careful not to delete anything in this box. At the end of the text box, add a semi-colon if there is not one already, and add "C:\Program Files\Java\jdk1.6.0\bin" to the text box. This is assuming you did not change the file path of the installation.
  14. Install the Java Software Development Kit Step 14.jpg

    Click "Apply" and "OK" to all the windows you have just opened. Open the command prompt again, while following steps 6-9 to see if that "javac" command works.
  15. Install the Java Software Development Kit Step 15.jpg

    Congratulations! You have succesfully installed JDK on your system.

Saturday, May 10, 2014

PTCL ADSL+3G Evo Router


PTCL introduced its new ADSL + 3G Evo Router in Pakistan.
1) ADSL Modem
2) 3G Evo Router
3) Wireless N150 Mbps 20/40 MHz 4.IPTV via Wifi works like a charm
4) USB storage server
5) Wireless Print Server
6)Guest Wifi SSID

Wednesday, April 23, 2014

3 G in Pakistan

Today was the big day in the technological history of Pakistan. Government of Pakistan has successfully auctioned 3G & 4G licences to four telcos of Pakistan today. After offering 3G/4G services by telecos, customers will be able to get ultra high speed broadband on their smartphones with speed ranging from 1MB - 42 MBs.
Final winners and details are as follows.
Zong won 10Mhz spectrum for 3G and 10Mhz for 4G.
Mobilink won 10Mhz for 3G.
Telenor won 5Mhz for 3G .
Ufone won 5Mhz for 3G.
So as of now there are four companies which are going to offer 3G services to its customer except Warid which did not participate in the auction.
Expect a more than 2 MB/sec download speed in scenario of Pakistan.


Friday, April 11, 2014

How to make your pc softwares password protected.

Today I am going to tell you a trick to make your pc softwares password protected. It means whenever anyone open any software in your pc then he/she will be asked for a password if the user don’t know the password then he can not use the software. If you are interested to protect your pc softwares with password then just follow below steps
 
STEP 1:
First of all download a software named Password Door to your pc [Download: 594.85 KB]

STEP 2:
Now install it to your pc, while installing , it will ask you to enter a password which will be used to open the password protected softwares.

STEP 3:
Now open Password Door with the help of password which you have entered while installing
Now Click on protect a program.

STEP 4:
Now You’ll see a list of all program on which you can set password.
Select the app from the list and make it password protect.

Now whenever you or any other user open password protected app, app will ask for the password. if you know the password only then you can access the application.

NOTE: If you are thinking, your little bro or sis uninstall Password Door to access the application, then they can’t do it, because this program will ask for the same password to uninstall it from pc.

How to post blank comment or status On facebook

First Go To Comment Field Where You Want To Post Comment or Status.
Then Hold Alt Key And Type 0173 From Numeric Pad.
Press Enter To Post Comment.
OR
Paste this string into the text field: @+[0:0: ] and remove '+' sign.
See the magic.

How to delete administrator password without any software

Method 1
Boot up with DOS and delete the sam.exe and sam.log files from Windows\system32\config in your hard drive. Now when you boot up in NT the password on your built-in administrator account which will be blank (i.e No password). This solution works only if your hard drive is FAT kind.
Method 2
Step 1. Put your hard disk of your computer in any other pc .
Step 2. Boot that computer and use your hard disk as a secondary hard disk (D'nt boot as primary hard disk ).
Step 3. Then open that drive in which the victim’s window(or your window) is installed.
Step 4. Go to location windows->system32->config
Step 5. And delete SAM.exe and SAM.log
Step 6. Now remove hard disk and put in your computer.
Step 7. And boot your computer.