Saturday 22 June 2013

A Complete List of Computer Shortcut Keys: Keyboard Shortcuts

SHORTCUT KEYS

Alt + F File menu options in current program
Alt + E Edit options in current program
F1 Universal help (for all programs)
Ctrl + A Select all text
Ctrl + X Cut selected item
Shift + Del Cut selected item
Ctrl + C Copy selected item
Ctrl + Ins Copy selected item
Ctrl + V Paste
Shift + Ins Paste
Home Go to beginning of current line
Ctrl + Home Go to beginning of document
End Go to end of current line
Ctrl + End Go to end of document
Shift + Home Highlight from current position to beginning of line
Shift + End Highlight from current position to end of line
Ctrl + f Move one word to the left at a time
Ctrl + g Move one word to the right at a time

MICROSOFT® WINDOWS® SHORTCUT KEYS

Alt + Tab Switch between open applications
Alt +Shift + Tab Switch backwards between open applications
Alt + Print Screen Create screen shot for current program
Ctrl + Alt + Del Reboot/Windows® task manager
Ctrl + Esc Bring up start menu
Alt + Esc Switch between applications on taskbar
F2 Rename selected icon
F3 Start find from desktop
F4 Open the drive selection when browsing
F5 Refresh contents
Alt + F4 Close current open program
Ctrl + F4 Close window in program
Ctrl + Plus Key Automatically adjust widths of all columns in Windows Explorer
Alt + Enter Open properties window of selected icon or program
Shift + F10 Simulate right-click on selected item
Shift + Del Delete programs/files permanently
Holding Shift During Bootup Boot safe mode or bypass system files
Holding Shift During Bootup When putting in an audio

WINKEY SHORTCUTS

WINKEY + D Bring desktop to the top of other windows
WINKEY + M Minimize all windows
WINKEY + SHIFT + M Undo the minimize done by WINKEY + M and WINKEY + D
WINKEY + E Open Microsoft Explorer
WINKEY + Tab Cycle through open programs on taskbar
WINKEY + F Display the Windows® Search/Find feature
WINKEY + CTRL + F Display the search for computers window
WINKEY + F1 Display the Microsoft® Windows® help
WINKEY + R Open the run window
WINKEY + Pause /Break Open the system properties window
WINKEY + U Open utility manager
WINKEY + L Lock the computer (Windows XP® & later)

WORD® SHORTCUT KEYSWORD® SHORTCUT KEYS

Ctrl + A Select all contents of the page
Ctrl + B Bold highlighted selection
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + N Open new/blank document
Ctrl + O Open options
Ctrl + P Open the print window
Ctrl + F Open find box
Ctrl + I Italicize highlighted selection
Ctrl + K Insert link
Ctrl + U Underline highlighted selection
Ctrl + V Paste
Ctrl + Y Redo the last action performed
Ctrl + Z Undo last action
Ctrl + G Find and replace options
Ctrl + H Find and replace options
Ctrl + J Justify paragraph alignment
Ctrl + L Align selected text or line to the left
Ctrl + Q Align selected paragraph to the left
Ctrl + E Align selected text or line to the center
Ctrl + R Align selected text or line to the right
Ctrl + M Indent the paragraph
Ctrl + T Hanging indent
Ctrl + D Font options
Ctrl + Shift + F Change the font
Ctrl + Shift + > Increase selected font +1
Ctrl + ] Increase selected font +1
Ctrl + Shift + < Decrease selected font -1
Ctrl + [ Decrease selected font -1
Ctrl + Shift + * View or hide non printing characters
Ctrl + f Move one word to the left
Ctrl + g Move one word to the right
Ctrl + h Move to beginning of the line or paragraph
Ctrl + i Move to the end of the paragraph
Ctrl + Del Delete word to right of cursor
Ctrl + Backspace Delete word to left of cursor
Ctrl + End Move cursor to end of document
Ctrl + Home Move cursor to beginning of document
Ctrl + Space Reset highlighted text to default font
Ctrl + 1 Single-space lines
Ctrl + 2 Double-space lines
Ctrl + 5 1.5-line spacing
Ctrl + Alt + 1 Change text to heading 1
Ctrl + Alt + 2 Change text to heading 2
Ctrl + Alt + 3 Change text to heading 3
F1 Open help
Shift + F3 Change case of selected text
Shift + Insert Paste
F4 Repeat last action performed (Word 2000+)
F7 Spell check selected text and/or document
Shift + F7 Activate the thesaurus
F12 Save as
Ctrl + S Save
Shift + F12 Save
Alt + Shift + D Insert the current date
Alt + Shift + T Insert the current time
Ctrl + W Close document

EXCEL® SHORTCUT KEYS

F2 Edit the selected cell
F5 Go to a specific cell
F7 Spell check selected text and/or document
F11 Create chart
Ctrl + Shift + ; Enter the current time
Ctrl + ; Enter the current date
Alt + Shift + F1 Insert new worksheet
Shift + F3 Open the Excel® formula window
Shift + F5 Bring up search box
Ctrl + A Select all contents of worksheet
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + C Copy selected text
Ctrl + V Paste
Ctrl + D Fill
Ctrl + K Insert link
Ctrl + F Open find and replace options
Ctrl + G Open go-to options
Ctrl + H Open find and replace options
Ctrl + U Underline highlighted selection
Ctrl + Y Underline selected text
Ctrl + 5 Strikethrough highlighted selection
Ctrl + O Open options
Ctrl + N Open new document
Ctrl + P Open print dialog box
Ctrl + S Save
Ctrl + Z Undo last action
Ctrl + F9 M
in
imize current window
Ctrl + F10 Maximize currently selected window
Ctrl + F6 Switch between open workbooks/windows
Ctrl + Page up & Page Down Move between Excel® worksheets in the same document
Ctrl + Tab Move between two or more open Excel® files
Alt + = Create formula to sum all of above cells
Ctrl + ‘ Insert value of above cell into current cell
Ctrl + Shift + ! Format number in comma format
Ctrl + Shift + $ Format number in currency format
Ctrl + Shift + # Format number in date format
Ctrl + Shift + % Format number in percentage format
Ctrl + Shift + ^ Format number in scientific format
Ctrl + Shift + @ Format number in time format
Ctrl + g Move to next section of text
Ctrl + Space Select entire column
Shift + Space Select entire row
Ctrl + W Close document

OUTLOOK® SHORTCUT KEYS

Alt + S Send the email
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + P Open print dialog box
Ctrl + K Complete name/email typed in address bar
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + U Underline highlighted selection
Ctrl + R Reply to an email
Ctrl + F Forward an email
Ctrl + N Create a new email
Ctrl + Shift + A Create a new appointment to your calendar
Ctrl + Shift + O Open the outbox
Ctrl + Shift + I Open the inbox
Ctrl + Shift + K Add a new task
Ctrl + Shift + C Create a new contact
Ctrl + Shift+ J Create a new journal entry

A Complete List of Computer Shortcut Keys: Keyboard Shortcuts

SHORTCUT KEYS

Alt + F File menu options in current program
Alt + E Edit options in current program
F1 Universal help (for all programs)
Ctrl + A Select all text
Ctrl + X Cut selected item
Shift + Del Cut selected item
Ctrl + C Copy selected item
Ctrl + Ins Copy selected item
Ctrl + V Paste
Shift + Ins Paste
Home Go to beginning of current line
Ctrl + Home Go to beginning of document
End Go to end of current line
Ctrl + End Go to end of document
Shift + Home Highlight from current position to beginning of line
Shift + End Highlight from current position to end of line
Ctrl + f Move one word to the left at a time
Ctrl + g Move one word to the right at a time

MICROSOFT® WINDOWS® SHORTCUT KEYS

Alt + Tab Switch between open applications
Alt +Shift + Tab Switch backwards between open applications
Alt + Print Screen Create screen shot for current program
Ctrl + Alt + Del Reboot/Windows® task manager
Ctrl + Esc Bring up start menu
Alt + Esc Switch between applications on taskbar
F2 Rename selected icon
F3 Start find from desktop
F4 Open the drive selection when browsing
F5 Refresh contents
Alt + F4 Close current open program
Ctrl + F4 Close window in program
Ctrl + Plus Key Automatically adjust widths of all columns in Windows Explorer
Alt + Enter Open properties window of selected icon or program
Shift + F10 Simulate right-click on selected item
Shift + Del Delete programs/files permanently
Holding Shift During Bootup Boot safe mode or bypass system files
Holding Shift During Bootup When putting in an audio

WINKEY SHORTCUTS

WINKEY + D Bring desktop to the top of other windows
WINKEY + M Minimize all windows
WINKEY + SHIFT + M Undo the minimize done by WINKEY + M and WINKEY + D
WINKEY + E Open Microsoft Explorer
WINKEY + Tab Cycle through open programs on taskbar
WINKEY + F Display the Windows® Search/Find feature
WINKEY + CTRL + F Display the search for computers window
WINKEY + F1 Display the Microsoft® Windows® help
WINKEY + R Open the run window
WINKEY + Pause /Break Open the system properties window
WINKEY + U Open utility manager
WINKEY + L Lock the computer (Windows XP® & later)

WORD® SHORTCUT KEYSWORD® SHORTCUT KEYS

Ctrl + A Select all contents of the page
Ctrl + B Bold highlighted selection
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + N Open new/blank document
Ctrl + O Open options
Ctrl + P Open the print window
Ctrl + F Open find box
Ctrl + I Italicize highlighted selection
Ctrl + K Insert link
Ctrl + U Underline highlighted selection
Ctrl + V Paste
Ctrl + Y Redo the last action performed
Ctrl + Z Undo last action
Ctrl + G Find and replace options
Ctrl + H Find and replace options
Ctrl + J Justify paragraph alignment
Ctrl + L Align selected text or line to the left
Ctrl + Q Align selected paragraph to the left
Ctrl + E Align selected text or line to the center
Ctrl + R Align selected text or line to the right
Ctrl + M Indent the paragraph
Ctrl + T Hanging indent
Ctrl + D Font options
Ctrl + Shift + F Change the font
Ctrl + Shift + > Increase selected font +1
Ctrl + ] Increase selected font +1
Ctrl + Shift + < Decrease selected font -1
Ctrl + [ Decrease selected font -1
Ctrl + Shift + * View or hide non printing characters
Ctrl + f Move one word to the left
Ctrl + g Move one word to the right
Ctrl + h Move to beginning of the line or paragraph
Ctrl + i Move to the end of the paragraph
Ctrl + Del Delete word to right of cursor
Ctrl + Backspace Delete word to left of cursor
Ctrl + End Move cursor to end of document
Ctrl + Home Move cursor to beginning of document
Ctrl + Space Reset highlighted text to default font
Ctrl + 1 Single-space lines
Ctrl + 2 Double-space lines
Ctrl + 5 1.5-line spacing
Ctrl + Alt + 1 Change text to heading 1
Ctrl + Alt + 2 Change text to heading 2
Ctrl + Alt + 3 Change text to heading 3
F1 Open help
Shift + F3 Change case of selected text
Shift + Insert Paste
F4 Repeat last action performed (Word 2000+)
F7 Spell check selected text and/or document
Shift + F7 Activate the thesaurus
F12 Save as
Ctrl + S Save
Shift + F12 Save
Alt + Shift + D Insert the current date
Alt + Shift + T Insert the current time
Ctrl + W Close document

EXCEL® SHORTCUT KEYS

F2 Edit the selected cell
F5 Go to a specific cell
F7 Spell check selected text and/or document
F11 Create chart
Ctrl + Shift + ; Enter the current time
Ctrl + ; Enter the current date
Alt + Shift + F1 Insert new worksheet
Shift + F3 Open the Excel® formula window
Shift + F5 Bring up search box
Ctrl + A Select all contents of worksheet
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + C Copy selected text
Ctrl + V Paste
Ctrl + D Fill
Ctrl + K Insert link
Ctrl + F Open find and replace options
Ctrl + G Open go-to options
Ctrl + H Open find and replace options
Ctrl + U Underline highlighted selection
Ctrl + Y Underline selected text
Ctrl + 5 Strikethrough highlighted selection
Ctrl + O Open options
Ctrl + N Open new document
Ctrl + P Open print dialog box
Ctrl + S Save
Ctrl + Z Undo last action
Ctrl + F9 M
in
imize current window
Ctrl + F10 Maximize currently selected window
Ctrl + F6 Switch between open workbooks/windows
Ctrl + Page up & Page Down Move between Excel® worksheets in the same document
Ctrl + Tab Move between two or more open Excel® files
Alt + = Create formula to sum all of above cells
Ctrl + ‘ Insert value of above cell into current cell
Ctrl + Shift + ! Format number in comma format
Ctrl + Shift + $ Format number in currency format
Ctrl + Shift + # Format number in date format
Ctrl + Shift + % Format number in percentage format
Ctrl + Shift + ^ Format number in scientific format
Ctrl + Shift + @ Format number in time format
Ctrl + g Move to next section of text
Ctrl + Space Select entire column
Shift + Space Select entire row
Ctrl + W Close document

OUTLOOK® SHORTCUT KEYS

Alt + S Send the email
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + P Open print dialog box
Ctrl + K Complete name/email typed in address bar
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + U Underline highlighted selection
Ctrl + R Reply to an email
Ctrl + F Forward an email
Ctrl + N Create a new email
Ctrl + Shift + A Create a new appointment to your calendar
Ctrl + Shift + O Open the outbox
Ctrl + Shift + I Open the inbox
Ctrl + Shift + K Add a new task
Ctrl + Shift + C Create a new contact
Ctrl + Shift+ J Create a new journal entry

Wednesday 19 June 2013

what is Storage Class in c

C Programming Storage Class

Every variable and function in C programming has two properties: type and storage class. Type refers to the data type of variable whether it is character or integer or floating-point value etc.
There are 4 types of storage class:
  1. automatic
  2. external
  3. static
  4. register

Automatic storage class

Keyword for automatic variable

auto
Variables declared inside the function body are automatic by default. These variable are also known as local variables as they are local to the function and doesn't have meaning outside that function
Since, variable inside a function is automatic by default, keyword auto are rarely used.

External storage class

External variable can be accessed by any function. They are also known as global variables. Variables declared outside every function are external variables.
In case of large program, containing more than one file, if the global variable is declared in file 1 and that variable is used in file 2 then, compiler will show error. To solve this problem, keyword extern is used in file 2 to indicate that, the variable specified is global variable and declared in another file.

Example to demonstrate working of external variable

  1. #include
  2. void Check();
  3. int a=5;
  4. /* a is global variable because it is outside every function */
  5. int main(){
  6. a+=4;
  7. Check();
  8. return 0;
  9. }
  10. void Check(){
  11. ++a;
  12. /* ----- Variable a is not declared in this function but, works in any function as they are global variable ------- */
  13. printf("a=%d\n",a);
  14. }
Output
a=10

Register Storage Class

Keyword to declare register variable

register
Example of register variable
register int a;
Register variables are similar to automatic variable and exists inside that particular function only.
If the compiler encounters register variable, it tries to store variable in microprocessor's register rather than memory. Value stored in register are much faster than that of memory.
In case of larger program, variables that are used in loops and function parameters are declared register variables.
Since, there are limited number of register in processor and if it couldn't store the variable in register, it will automatically store it in memory.

Static Storage Class

The value of static variable persists until the end of the program. A variable can be declared static using keyword: static. For example:
static int i;
Here, i is a static variable.

Example to demonstrate the static variable

  1. #include <stdio.h>
  2. void Check();
  3. int main(){
  4. Check();
  5. Check();
  6. Check();
  7. }
  8. void Check(){
  9. static int c=0;
  10. printf("%d\t",c);
  11. c+=5;
  12. }
Output
0      5     10
During first function call, it will display 0. Then, during second function call, variable c will not be initialized to 0 again, as it is static variable. So, 5 is displayed in second function call and 10 in third call.
If variable c had been automatic variable, the output would have been:
0     0     0
A storage class defines the scope (visibility) and life time of variables and/or functions within a C Program.
There are following storage classes which can be used in a C Program
  • auto
  • register
  • static
  • extern

auto - Storage Class

auto is the default storage class for all local variables.
 {
            int Count;
            auto int Month;
 }
The example above defines two variables with the same storage class. auto can only be used within functions, i.e. local variables.

register - Storage Class

register is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and cant have the unary '&' operator applied to it (as it does not have a memory location).
 {
            register int  Miles;
 }
Register should only be used for variables that require quick access - such as counters. It should also be noted that defining 'register' goes not mean that the variable will be stored in a register. It means that it MIGHT be stored in a register - depending on hardware and implimentation restrictions.

static - Storage Class

static is the default storage class for global variables. The two variables below (count and road) both have a static storage class.
 static int Count;
        int Road;

        {
            printf("%d\n", Road);
        }
static variables can be 'seen' within all functions in this source file. At link time, the static variables defined here will not be seen by the object modules that are brought in.
static can also be defined within a function. If this is done the variable is initalised at run time but is not reinitalized when the function is called. This inside a function static variable retains its value during vairous calls.
   void func(void);
   
   static count=10; /* Global variable - static is the default */
   
   main()
   {
     while (count--) 
     {
         func();
     }
   
   }
   
   void func( void )
   {
     static i = 5;
     i++;
     printf("i is %d and count is %d\n", i, count);
   }
   
   This will produce following result
   
   i is 6 and count is 9
   i is 7 and count is 8
   i is 8 and count is 7
   i is 9 and count is 6
   i is 10 and count is 5
   i is 11 and count is 4
   i is 12 and count is 3
   i is 13 and count is 2
   i is 14 and count is 1
   i is 15 and count is 0

NOTE : Here keyword void means function does not return anything and it does not take any parameter. You can memoriese void as nothing. static variables are initialized to 0 automatically.
Definition vs Declaration : Before proceeding, let us understand the difference betweendefintion and declaration of a variable or function. Definition means where a variable or function is defined in realityand actual memory is allocated for variable or function. Declaration means just giving a reference of a variable and function. Through declaration we assure to the complier that this variable or function has been defined somewhere else in the program and will be provided at the time of linking. In the above examples char *func(void) has been put at the top which is a declaration of this function where as this function has been defined below to main()function.
There is one more very important use for 'static'. Consider this bit of code.
   char *func(void);

   main()
   {
      char *Text1;
      Text1 = func();
   }

   char *func(void)
   {
      char Text2[10]="martin";
      return(Text2);
   }
Now, 'func' returns a pointer to the memory location where 'text2' starts BUT text2 has a storage class of 'auto' and will disappear when we exit the function and could be overwritten but something else. The answer is to specify
    static char Text[10]="martin";
The storage assigned to 'text2' will remain reserved for the duration if the program.

extern - Storage Class

extern is used to give a reference of a global variable that is visible to ALL the program files. When you use 'extern' the variable cannot be initalized as all it does is point the variable name at a storage location that has been previously defined.
When you have multiple files and you define a global variable or function which will be used in other files also, then extern will be used in another file to give reference of defined variable or function. Just for understanding extern is used to decalre a global variable or function in another files.
File 1: main.c
   int count=5;

   main()
   {
     write_extern();
   }
File 2: write.c
   void write_extern(void);

   extern int count;

   void write_extern(void)
   {
     printf("count is %i\n", count);
   }
Here extern keyword is being used to declare count in another file.
Now compile these two files as follows
   gcc main.c write.c -o write
This fill produce write program which can be executed to produce result.
Count in 'main.c' will have a value of 5. If main.c changes the value of count - write.c will see the new value

Featured post

Life Infotech now a leading brand in the field of technology training

  Life Infotech now a leading brand in the field of technology training & its invites students around the nation to be a part of the Tra...