Sentimental analysis aims at inferring how people express their opinion over any piece of text or topic of interest. This article deals with detection of an implicit form of the sentiment, referred to as sarcasm. Sarcasm conveys the opposite of what people try to convey in order to criticize or ridicule in a humorous way. It plays a vital role in social networks since most of the tweets or posts contain sarcastic nuances. Existing approaches towards the study of sarcasm deals only with the detection of sarcasm. In this paper, in addition to detecting sarcasm from text, an approach has been proposed to identify the type of sarcasm. The main motivation behind determining the types of sarcasm is to identify the level of hurt or the true intent behind the sarcastic text. The proposed work aims to improve upon the existing approaches by incorporating a new perspective which classifies the sarcasm based on the level of harshness employed. The major application of the proposed work would be relating the emotional state of a person to the type of sarcasm exhibited by him/her which could provide major insights about the emotional behavior of a person. An ensemble-based feature selection method has been proposed for identifying the optimal set of features needed to detect sarcasm from tweets. This optimal set of features was employed to detect whether the tweet is sarcastic or not. After detecting sarcastic sentences, a multi-rule based approach has been proposed to determine the type of sarcasm. As an initial attempt, sarcasm has been classified into four types, namely, polite sarcasm, rude sarcasm, raging sarcasm, and deadpan sarcasm. The performance and efficiency of the proposed approach has been experimentally analyzed, and change in mood of a person for each sarcastic type has been modelled. The overall accuracy of the proposed ensemble feature selection algorithm for sarcasm detection is around 92.7%, and the proposed multi-rule approach for sarcastic type identification achieves an accuracy of 95.98%, 96.20%, 99.79%, and 86.61% for polite, rude, raging, and deadpan types of sarcasm, respectively.