Q:

Unable to populate custom listView using BaseAdapter in Android

I am new to Android. I am creating custom listView using BaseAdapter.
I try this code,but my app get crashed. 
I don't know where I made mistake? 
AreaFragment
public class AreaFragment extends Fragment{

private ListView list;
private Context c;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    View rootView = inflater.inflate(R.layout.fragment_area, container, false);

    list = (ListView)rootView.findViewById(R.id.areaList);

    list.setAdapter(new myAdapter(c));

class Row{

    String Names;
    String areaNames;

    Row(String areaNames,String areaLocality) {
        this.Names=areaNames;
        this.areaNames=areaLocality;
    }
}

class myAdapter extends BaseAdapter{

    ArrayList<Row> list;
    Context context;

    public myAdapter(Context c) {
        context =c;
        list = new ArrayList<Row>();
        Resources res = c.getResources();
        String[] names = res.getStringArray(R.array.names);
        String[] areasName = res.getStringArray(R.array.areasName);

        for(int i=0;i<10;i++){
            list.add(new Row(names[i],areasName[i]));
        }
    }
    @Override
    public int getCount() {         
        return list.size();
    }

    @Override
    public Object getItem(int position) {           
        return list.get(position);
    }

    @Override
    public long getItemId(int position) {           
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {     

        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View row = inflater.inflate(R.layout.row, parent, false);
        TextView areaNames = (TextView) row.findViewById(R.id.mainTextView);
        TextView areaLocality = (TextView) row.findViewById(R.id.subTextView);

        Row temp = list.get(position);
        areaNames.setText(temp.Names);
        areaLocality.setText(temp.areaNames);

        return row;
    }

}

}
Strings.xml
 <string-array name="names">
    <item >Derek</item>
    <item >David</item>
    <item >ABC</item>
 </string-array>
<string-array name="areasName">
    <item >India</item>
    <item >UAE</item>
    <item >XYZ</item>
</string-array>

Row.xml
in this file I have nothing great. It contains only two textViews. 
LOG CAT
FATAL EXCEPTION: main
Process: com.threepin.deepakcorporation, PID: 14033
java.lang.NullPointerException
at com.threepin.deepakcorporation.AreaFragment$myAdapter.<init>    (AreaFragment.java:73)
at com.threepin.deepakcorporation.AreaFragment.onCreateView(AreaFragment.java:38)
at android.app.Fragment.performCreateView(Fragment.java:1700)
 at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
at android.app.BackStackRecord.run(BackStackRecord.java:684)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5127)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(Native Method)

A:

first in onCreateView()
change this
list.setAdapter(new myAdapter(c));

to 
list.setAdapter(new myAdapter(this.getActivity()));

because 'c' will be null.
for next, 
as in above.
change
for(int i=0;i<10;i++)

to 
for(int i=0;i<oneofarray.length;i++)

