1) configured router with sub-interfaces and assigned vlan's to every sub-interface using dot1q
2)configured switch ports with vlan's and attachd Pc's to every vlan.
3)pc's from all vlan can ping all the subinterface and other vlans's.
4)I can't ping the router sub-interfaces from the switch
do we have to configure any more on switch or router to make switch ping all the router sub-interfaces?
Posting the router config is helpful. It shows that you do not have anything configured on the router on FastEther0/0 for VLAN 1. VLAN 1 is the management interface of the switc. If the router does not have VLAN 1 configured with an IP address that matches the subnet used on the switch then the switch will not be able to ping the router (or anything else in the network).
Note that not having an interface on the router for VLAN 1 only impacts traffic from the management interface of the switch. All the switch ports and all the devices connected to user VLANs on the switch will still work ok. But the switch itself will not be able to access anything without VLAN 1 configured and active on the router.
As p.bevilacqua said above. Your switch is purely a layer 2 switch at present.
You need to do the folowing.
a). Decide on an IP subnet for your device management.
b). Create another sub interface on your router and assign it the first IP address from your management subnet.
c). Assign the second IP address from your management subnet to the VLAN1 SVI on the switch.
d). Configure a default gateway on the switch. The default gateway IP address should be the IP address assigned to the sub interface on the router which has the first IP address of the management subnet.
Your switch is running as a pure L2 switch.
You need to configure L3 interfaces -SVIs- on the switch with for each vlan you want to ping.
int vlan x
ip add 
only after that you can ping from the sw.
You need to configure an IP address for VLAN 1 to enable ping from the switch to the router. As has been suggested you also need a default-gateway configured if you want the switch to access anything outside the subnet of its management interface.
I suppose it's a purely layer 2 switch that you're talking about. If so, configure "ip default-gateway x.x.x.x" on the switch where x.x.x.x is router address in vlan 1 (native).
Please rate post if it helps!