Monday, September 10, 2012

Windows Key Board Shortcuts

The most used Windows keyboard shortcuts as following:

Windows
Open or close the start menu

Windows + PAUSE
Display the System Properties dialog box

Windows + D
Display the desktop

Windows + M
Minimise all windows

Windows + Shift + M
Restore minimised windows to the desktop

Windows + E
Open My Computer

Windows + F
Search for a file or folder

Windows + L
Lock your computer or Switch users

Windows + R
Open the Run dialog box

Windows +  T
Cycle through program on the taskbar

Windows + Tab
Switch program in 3-D ways

Windows + SpaceBar
Brings all gadgets to the front and select Windows Sidebar

Windows + G

Windows Keyboard Shortcuts

There are many people who want to work faster with Windows. If you know well about key board shortcuts then it will save your time and of course, more easily. We are using Windows XP as reference.

Most used general keyboard shortcuts:

ctrl + C
Copy the selected item or text

ctrl + V
Copy the selected item or text

ctrl + X
Cut and Copy the selected item or text

ctrl + Z
Undo the last work

ctrl + Y
Redo the last work

delete
Delete the selected item and move it to the Recycle Bin

Shift + Delete
Delete the selected item parmantly from system

Ctrl + Right Arrow
Move the cursor to the beginning of the next word


Ctrl + Left Arrow
Move the cursor to the beginning of the previous word


Ctrl + Down Arrow
Move the cursor to the beginning of the next paragraph


Ctrl + Up Arrow
Move the cursor to the beginning of the previous paragraph

Ctrl + Shift + an arrow key
Select a block of text

Shift + an arrow key
Select particular text

Ctrl + any arrow key + SpaceBar
Select multiple individual items

Ctrl + A
Select all items in a document or window

Alt + Enter
Display the properties of the selected item

Alt + Tab
Switch between open program or items

Alt + Esc
Cycle through items in the order in which they were opened

Ctrl + Esc  or [Windows]
Open the start menu

Alt + Hot Key
Display the related menu.
Hot key is a underlined key, when press the underlined word with Alt, its perform the related work.

Esc
Cancel the current task

Ctrl + Shift + Esc or Ctrl + Alt + Delete
Open the task Manager.




Related programs:

  1. Run command shortcuts
  2. Make your own Windows Run command
  3. Windows keyboard shortcuts
  4. Dialog box shortcuts
  5. Function key shortcuts


Sunday, September 9, 2012

Make Own Windows Run Command


Can i create my own Windows Run Command? 
or
How I create my own Windows Run Command?

Yes, You can create your own Windows Run Command. It is very simple. To make your own  Windows Run Command, follow the following steps:

step 1: 

Create a Shortcut at desktop for your program, which you want to make "Run Command".

step 2:

Now re-name of shortcut and give your run command name. 
For example, we replace the shortcut name to "expertofxp".

step 3: Move this shortcut to c:\Windows

step 4: Finish. Congratulations you done it.

Now check it now:

go to start > Run
and type the name of shortcut, in our case, we type: expertofxp
click OK

and the related program will be open.


Related programs:


  1. Run command shortcuts
  2. General keyboard shortcuts
  3. Windows keyboard shortcuts
  4. Dialog box shortcuts
  5. Function key shortcuts

Run Command Shortcuts

If you want to work faster at computer system, then it is best practise to use keyboard shortcuts.

If you want to start a new application / utilities, then you navigate hundred windows and dialog boxes. Or rather then you can do same job through "Run Command".

How to reach run command?

  1. Start > Run
  2. press ( [Windows] + [R] )
The keyboard shortcuts for run command in Windows XP:


Mostly use run command shortcuts as:

Calculator -------------------------------  calc
  Character map --------------------------  charmap  
Clipboard --------------------------------  clipbrd
  Command Prompt ----------------------  cmd or command  
Computer Management ---------------  compmgmt.msc
  Control panel --------------------------  control  
Display Properties --------------------  desk.cpl or control desktop
  Date and Time properties ----------  timedate.cpl  
Fonts -----------------------------------  control fonts
  Game Controllers ---------------------  joy.cpl  
Internet Explorer ---------------------  iexplore
  Keyboard Properties -----------------  control keyboard  
Microsoft Word -----------------------  winword
  Microsoft Excel -----------------------  excel  
Microsoft PowerPoint ----------------  powerpnt
  Microsoft Paint -----------------------  mspaint or pbrush  
Mouse Properties --------------------  main.cpl
  Notepad ------------------------------  notepad  
On Screen Keyboard ----------------  osk
  Outlook Express --------------------  msimn  
Printers and Faxes --------------------  control printers
  Regional Settings -------------------  intl.cpl  
shutdown Windows -------------------  shutdown
  Sounds and Audio ---------------------  mmsys.cpl  
System Configuration Editor ---------  sysedit
  System Configuration Utility ---------  msconfig  
System Information -------------------  msinfo32
  System Properties ---------------------  sysdm.cpl  
Task Manager --------------------------  taskmgr
  Windows Explorer ---------------------  explorer  
Windows Firewall ----------------------  firewall.cpl
  Windows Magnifier --------------------  magnify  
Windows Media Player ----------------  wmplayer
  Windows System Security Tool ------  syskey  
Windows Version ----------------------  winver
  Wordpad --------------------------------  write  


Related programs:


  1. Make your own Windows Run command
  2. General keyboard shortcuts
  3. Windows keyboard shortcuts
  4. Dialog box shortcuts
  5. Function key shortcuts

Saturday, September 8, 2012

Number Pyramid

Q. Write a C program to print the following number triangle.
or
Q. Write a C program to display the following number pyramid.

       1
      222
     33333
    4444444
   555555555

Ans.

/*c program for number pyramid*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int num,r,c,k,sp;
 printf("Enter number of rows : ");
 scanf("%d", &num);
 for(r=1; r<=num; r++)
 {
  for(sp=num-r; sp>0; sp--)
     printf(" ");
  for(c=1; c<=r; c++)
     printf("%d", r);
  for(k=2; k<=r; k++)
     printf("%d", r);
  printf("\n");
 }
 getch();
 return 0;
}

/**************Output**************/

Output of number pyramid C program
Screen shot for number pyramid C program

Tuesday, September 4, 2012

Pointer basic example

We has been discuss about what is pointer and concept of pointer. Now the following program demonstrates the relationship of our pointer discussion.

#include<stdio.h>
int main()
{
   int x = 5;
   int *y;

   y = &x;
   printf("\nAddress of x = %u", &x);
   printf("\nAddress of x = %u", x);
   printf("\nAddress of y = %u", &y);
   printf("\nValue of y = %d", y);
   printf("\nValue of x = %d", x);
   printf("\nValue of x = %d", *(&x));
   printf("\nValue of y = %d", *y);

  getch();
  return 0;
}

The output of above program would be:

Address of x = 2293620
Address of x = 5
Address of y = 2293616
Value of y = 2293620
Value of x = 5
Value of x = 5
Value of y = 5

/* Screen shot for above program */

Output of pointer basic example C program
Screen-shot for pointer basic example C program


note: the address of variable may be differ because its depend on compiler. I use Bloodshed software "Dev-C++" so you can see that here integer occupy 4 bytes.

The above program summarizes everything that we discussed in what is pointer and concept of pointer chapters. If you don't understand the program output, or the meaning of &x, &y, *y and *(&x), re-read the last 2 chapter of pointer:
What is pointer
Concept of pointer

Now look at the following declaration:

int *n;
char *ch;
float *area;

Here, n, ch and area are declared as pointer variable, i.e. these variable capable of holding addresses.
Keep in mind: Address ( location numbers ) are always whole numbers.
In summarize "we can say pointers are variable that contain addresses and addresses are always whole numbers."

The declaration float *area does not mean that area is going to contain a floating-point value. The meaning is, *area is going to contain the address of a floating-point value.
Similarly, char *ch means that ch is going to contain the address of a char value or in other words, the value at address stored in ch is going to be a char.

Now we know that "Pointer is a variable that contains address of another variable."
Can we further extended it? The answer is Yes, we can. Read in next chapter "Pointer Extended Example".


Related programs:


  1. What is pointer ?
  2. Concept of Pointer
  3. Pointer extend example

Sunday, September 2, 2012

Concept of Pointer

In last chapter ( what is pointer ) , we learn what is the basic of pointer. Now we are learning what is the concept of pointer and how to using it.

In last chapter we declare a variable
int n = 10 ;
and create a memory map, Now we learn how to do this.

Now we print the address of variable through following program:

#include<stdio.h>
int main()
{
  int n = 10;
  printf("\nAddress of n =%u", &n);
  printf("\nValue of n =%d", n);
  getch();
  return 0;
}

The output of above program:

Address of n = 65220
Value of n = 10

Useful tips i.e. explanations of above programs:
  • Look at the first printf() statement carefully, it used & ( address of operator ). So & return the address of memory location. In our case, the expression  &n return the address of variable n.
  •  %u is used for printing the unsigned integer.
Now, observe carefully the output of the following program:

#include<stdio.h>
int main()
{
  int n = 10;
  printf("\nAddress of n =%u", &n);
  printf("\nValue of n =%d", n);
  printf("\nValue of n =%d", *(&n));
  getch();
  return 0;
}

The output of above program:


Address of n = 65220
Value of n = 10
Value of n = 10

here you can notice that the value of *(&n) is same as printing the value of n.

The expression &n gives the address of the variable n. This address can be collected in a variable, by saying:

int p = &n;

but here 1 problem, p is simple variable so we can't use of variable p.
What is solution?
So here comes the concept of pointer. Now we declare the integer variable p as integer pointer variable:

int *p;
This declaration tells the compiler that p will be used to store the address of an integer value i.e. p points to an integer.

int *p;

Now let's understand the meaning of *. It stand for value at address  operator. It return the value at stored at particular address.
The "value at address" operator is also known "indirection operator".

Thus, 
int *p; would mean, the value at the address contained in p is an int.

let's check out what you grab:
Q. What will be output of following program?
  
     #include<stdio.h>
     int main()
     {
        int n = 10;
        printf("\nOutput of n =%d", n);
        printf("\nOutput of *n =%d", *n);
       getch();
       return 0;
     }

Ans.

Output of n = 10
Output of *n = error ( invalid indirection)

Can you understand why second printf() statement generate error? if yes then congratulation... And if you can't figure out then also don't worry because our next chapter is pointer practice session, in this you grab all about pointer.

The reason second printf() statement is generating error because, "value at address ( * )" is used only pointer variable/directly address i.e. "value at address" does not work with simple variable.
In our case n is simple variable and so compiler generate error.


Related programs:


  1. What is Pointer ?
  2. Pointer basic example
  3. Pointer extend example