Police today detained about 10,000 Hindu students on their way to a protest rally in the Kashmir Valley, where a day earlier 21 Moslems were killed in a reported shootout. The caravan of buses and trucks that was stopped in Udhampur, 45 miles north of Jammu, was headed toward Srinagar, where the Hindu activists of the All India Students' Federation had planned to hoist Indian flags. The government, fearing violence, had appealed to the Hindu activists not to hold their procession to Srinagar, a Moslem stronghold in Kashmir, the northern sector of Jammu-Kashmir state. The students, based in Jammu in a predominantly Hindu sector, had ignored the official pleas. The Hindu students are opposed to a Moslem secessionist movement that is attempting to get independence for Jammu-Kashmir state, the only Indian state in which the majority of the population is Moslem. The students were arrested without resistance, one official said, speaking under condition of anonymity. They were expected to be released after a few hours without charges being pressed. In Srinagar, shops were closed and traffic stayed off the roads today in response to a general strike call given by Moslem militants. The strike was to protest the deaths of 21 Kashmiris Tuesday during a shoot-out with paramiltary troops near Srinagar. The government claimed all the victims, including 17 people in a bus which exploded and caught fire, were militants. A government statement said the bus exploded when a stray bullet hit a pile of ammunition inside it. At least 1,175 people have ben killed in Kashmir since January, when the government started a crackdown on the secessionists. About 64 percent of Jammu-Kashmir's 6 million people are Moslems. About 82 percent of India's 880 million people are Hindus while Moslems account for 12 percent.