Saturday, 18 March 2017

Why Array index always starts with 0 not with 1?

In programming languages like C,C++,Java there is concept of array which is used to hold more than one value of same datatype.The array contains index and its value.Its index always starts with 0.Have you ever got question like why it is 0 only not 1 or 2 or 3 and so on?
Array Structure in programming languages
 Let us find it out by understanding an example.
Suppose one array is declared as... 
int a[7];

Here a  is a pointer which contain location of first element.To access 1st element,we write a[0].This is assigned as *(a+0).For 2nd element,it is *(a+1).Because has address of 1st element so for 2nd element we will increment it by 1. 

Now assume that index starts with 1.Then to access 1st element,we write a[1]. So it will assigned *(a+1-1).As you can see here,the extra operation is performed that is subtraction.This will require more memory and time for compiler as compare to array index 0.Also the performance will degrade if program code is large.
So,to avoid the extra operations,array index always starts with 0.Please share this if it is valuable. :) 


Friday, 13 January 2017

How to get rid of chromium malwar

Sometimes it happens that you are downloading something and automatically chromium is downloaded.Now whenever you you start your pc chromium screen appears.
        To get rid of this,try uninstalling chromium:

  1. go to start
  2. open control pannel
  3. select Programs then go to uninstall program
  4. right click on chromium and uninstall it.
If above steps doesn't work then open task manager and end all the chrome processes.Then try to uninstall the chromium.

Above steps doesn't work then open your browser setting.In this,select advance settings in which you will see System having two options.In this,you have to uncheck "continue running background apps when google chrome is closed".Close your browser and open again and you'll see that the issue is solved. 

Saturday, 7 January 2017

Hidden files and folder recovery on your USB drive

       Many times it happens that when you connect your USB drive and when you open it,it shows Nothing.But when you check its property,it contains all your data.you're like what the hell is wrong with my USB.Its the Virus that hides your data.
       To ensure that your files are safe,open your USB drive.In search bar,type *.*.You will see your folders and files.But its not the solution.
        To remove such virus follow this steps:


  1. Open Command prompt.
  2. Type your USB letter.e.g if it is G then type G: and hit enter.
  3. Now type the command->    attrib  -s  -h  -r  /s  /d  *.*  and press enter.
  4. Now close the command prompt and check your files and folder in my computer.
Here attrib is attribute command,"-"=remove priviledge,"s"=system,"h"=hidden,"r"=read-only and "*.*"=wild card characters means all files and folders.

Hash and Double quote key is swapped?

Hey guess,many of you might have faced this problem that # and "" keys are swapped that is when you press shift+2 it will print "" and when you press shift+' ,it will print @.
      Here is the solution:
May be you've'just changed the OS.Well,this happened because you're using different keyboard.Nothing much but all you have to do is change your keyboard type.Go to Control pannel >Clock,Language and region >Language.Now,you will see the option menu.In this you have to select English(United Kingdome).
      Now,check the keys.They are working perfectly.  ;)