Skip to main content

Posts

Showing posts from August, 2014

Google Tricks

Google isn't just for hypochondriacs looking up their symptoms or for trying to find a cool new restaurant. By just entering a few simple search terms, you can use Google to help plan and organize your life. It is  amazing . 1.) You can use Google as a timer, just set the time in the search bar as shown here. 2.) Google will also help you calculate your tips. 3.) You can find out what date any holiday falls on. 4.) Google will also find movie release dates for you. 5.) You can find full schedules for your favorite television shows. 6.) Google will also find the songs of your favorite bands. 7.) You can use the search engine to find what books your favorite authors wrote. 8.) It'll look up flight information for you. 9.) Do you know what time the sun rises? It'll tell you. 10.) It'll also give you information on your...

Javascript global variables

Question :  is there any difference between declaring a variable var a = 0 ; //1 and this way a = 0 ; //2 or window . a = 0 ; //3 in global scope? Soloution:      Yes, there are two differences, though in practical terms they're not usually big ones.  three statements explained var a = 0 ; ...creates a variable on the  variable object  for the global execution context, which is the global object, which on browsers is aliased as  window  (and is a DOM window object rather than just a generic object as it would be on non-browser implementations). The symbol  window  is, itself, actually a property of the global (window) object that it uses to point to itself. The upshot of all that is: It creates a property on  window  that you cannot delete. It's also defined before the first line of code runs (see "When  var  happens" below). Note that on IE8 and earlier, the property created on  ...

C advanced interview questions and answers

   C advanced interview questions and answers  (1) What will be output if you will compile and execute the following c code? struct   marks {   int   p :3;   int   c :3;   int   m :2; }; void   main (){   struct   marks  s={2,-6,5};   printf( "%d %d %d" ,s. p ,s. c ,s. m );   } (a) 2 -6 5 (b) 2 -6 1 (c) 2 2 1 (d) Compiler error (e) None of these Answer:  (c) Explanation: Binary value of 2: 00000 010  (Select three two bit) Binary value of 6: 00000110 Binary value of -6: 11111001+1=11111 010 (Select last three bit) Binary value of 5: 000001 01  (Select last two bit) Complete memory representation: (2) What will be output if you will compile and execute the following c code? void   main (){    int  huge*p=( int  huge*)0XC0563331;    int  huge*q=( int  huge*)0xC2551341;   ...