Translate

Labels

Saturday, 23 February 2013

PC TRICKS


Shrink Your Toolbar Size

Is your toolbar taking up too much room? Customize it! You can shrink the size of the buttons,
and if you know what each button does, you can remove the text labels underneath the buttons.
Click on the "View" menu, choose "Toolbars", and then select "Customize". On the "Customize
Toolbar" dialog box that follows, you can add or remove icons (buttons) to and from the toolbar,
shrink the size of the icons, and change how text is displayed near the icons, if at all.
When you are done modifying the toolbar, press "Close" to exit this dialog box.

PC TRICKS


Opening A Program With Keystrokes

Did you know you can assign certain keystrokes to open a program?
This way you won't have to stop what you're doing and double click on it with your mouse.
Right click on the chosen program on your desktop and select PROPERTIES. Click on the
Shortcut Tab. In the text box labeled SHORTCUT KEY, type your chosen letter. Ctrl + Alt will
automatically be added. Click OK. Now hit CTRL + ALT + letter.

MACRO CALL


 #define square(x) x*x
main()
{
int i;
i = 64/square(4);
printf("%d",i);
}

OUTPUT:
64

EXPLANATION:

The macro call square(4) will substituted by 4*4 so the expression becomes i = 64/4*4 . Since / and * has equal priority the expression will be evaluated as (64/4)*4 i.e. 16*4 = 64
  

Thursday, 21 February 2013

RUNTIME ERROR

BOUNDARY OVERFLOW

 int main()
{
int val[5]={1,2,3,4,5};
val[5] = 100;
printf("%d",val[5]);
return 0;
}



Here val is a 5-elements integer array and the array is initialized. Next we are trying to assign 100 to val[5] leads to runtime error - boundary overflow. Since array index begins with 0 and we are trying to assign or access the 6th element via val[5] but the val is a 5-elements integer array. This is known as Array Index Out of Bounds error.

Wednesday, 20 February 2013

SWAPPING WITH OUT TEMP VARIABLE


 int swap(int *a,int *b)
{
 *a=*a+*b;*b=*a-*b;*a=*a-*b;
}
main()
{
 int x=10,y=20;
 swap(&x,&y);
 printf("x= %d y = %d\n",x,y);
}

RUNTIME ERROR

STACK OVERFLOW

           main()
            {
            main();
            }

main function calls itself again and again. Each time the function is called its return address is stored in the call stack. Since there is no condition to terminate the function call, the call stack overflows at runtime. So it terminates the program and results in an error.

Sunday, 3 February 2013

FACE CODES FOR FACEBOOK CHAT


[[171108522930776]] - Troll face 
[[129627277060203]] - Poker face 
[[100002752520227]] - Okay 
[[164413893600463]] - Me Gusta 
[[189637151067601]] - Lol face 
[[106043532814443]] - Y U NO 
[[218595638164996]] - Yao Ming Face Meme 
[[100002727365206]] - Challenge Accepted