Latest Headlines from Cricketnext.com

Thursday 10 November 2011

C program to print acute angled triangle


#include<stdio.h>
#include<conio.h>
int main()
{
      int i,j,k,z,m;
      char a;
      printf("Enter of what do you wanna have the triangle\n");
      scanf("%c",&a);
      printf("\nHow many lines of triangle do you want?\n");
      scanf("%d",&z);
      m=z;  
      for(i=0;i<z;i++)
      {
                                         
                      for(j=0;j<m-1;j++)
                      printf(" ");
                   
                      for(k=0;k<i+1;k++)
                      printf("%c ",a);
                      printf("\n");
                      m--;
                   
      }
getch();
return 0;
}

C code for comparison 2 strings using pointers


#include<stdio.h>
#include<conio.h>
#include<string.h>
int comp(char *a, char *b,int x,int y);
int main()
{
    char g[50],f[50];
    int q,w,e,r;
    printf("Enter first sring :\n");
    gets(g);
   
    printf("\nEnter second string:\n");
    gets(f);
   
    comp(g,f,strlen(g),strlen(f));
    return 0;
}

int comp(char *a, char *b,int x,int y)
{
    int i;
    if(x!=y)
    printf("The strings are not same.");
    else
    {
        for(i=0;i<x;i++)
        {
                        if(*a!=*b)
                        {
                                  printf("Not same");
                                  getch();
                                  return 0;
                        }
                       
                        *a++;
                        *b++;
        }
        printf("Strings are same.");
    }
getch();
return 0;
}
                       
                       

Use of Malloc function in C with example


#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

int main()
{
      int *p,*table;
      int size;
      printf("size?\n");
      scanf("%d",&size);
      printf("\n");
      table=(int*)malloc(size*sizeof(int));
      if(table==0)
      {
                                                   printf("No space");
                                                   return 0;
      }
      printf("\n Adress of first byte is %d\n",table);
      printf("Enter values\n");
      for(p=table;p<table+size;p++)
      scanf("%d",p);
      for(p=table+size-1;p>=table;p--)
      printf("%d is stored at address %d\n",*p,p);
      getch();
      return 0;
      }
     
                                                 

Reversing a string using pointers


#include<stdio.h>
#include<conio.h>
#include<string.h>
int rev(char *p,int x);
int main()
{
                 int m;
                 char a[10];
                 printf("Enter string:\n");
                 scanf("%[^\n]",a);
                 printf("You enetered:\n");
                 puts(a);
                 m=strlen(a);
                 printf("after reversing:\n");
                 rev(&a[strlen(a)],m);
                 getch();
                 return 0;
}

int rev(char *p, int q)
{
    int i=0,j,z;
   
    while(i!=(q+1))
    {      
    printf("%c",*p);
    *p--;
    i++;
    }
    getch();
}

Friday 4 November 2011

3 instances of Mahabharata in which Dharma is violated?




The Mahabharata is a great hindu epic since ancient time which is based on the  Kurukshetra war and the Kauravas and Pandavas. The epic mainly describes about the war which lead to the formation of the great epic. The epic consists of about 74000 verses alongwith long prose passages. In the Mahabharata there are various incidents of Dharma being violated and it is the only reason which led to the war and furher led to the great epic formation. Also there are various instances of dharma being violated:-



1)  Duryodhana’ trap:-
Duryodhana is mentored by his maternal uncle Shakuni, who desires the elevation of his sister's children at the expense of the Pandavas. Shakuni masterminds most of Duryodhana's plots to humiliate and kill the Pandavas. When Bheeshmapitamah asked Dhritrashtra to declare the eldest heir, Yudhisthira as the King of Hastinapur, Duryodhan’s old jealousy towards the Pandavas arouse once again. He decided  to kill all the Pandavas and finish the entire generation so that he could take hold of all the property and wealth that they possessed and could obtain the throne of Hastinapur. He  built a palace for the Pandavas to live in by his trusted mason, Purochan. The palace  was built of ‘lacquer’ ,’hay’, ‘ghee’ which are very flammable. He then asked his father, Dhritrashtra to send the Pandavas to a fair which was then being held in the forest, Varnavrat without letting his father know about his scheme,where he had made palace. When the Pandavas visited the fair, Duryodhan invited his Pandavas and their mother Kunti to live in the palace he gifted, accept it. He had told Purochan to stay back there by making a secret way out and after when they all sleep, he had to burn the palace with them inside. Vidur knew that there was some problem and a strategy made by Duryodhan .So he immedialtely sent message to the Pandavas informing about plan of Duryodhan. The Pandavas did not want to tell anyone about it, so they  found a solution and they decided to dig a secret underground tunnel that could take them out of the palace to the forest without the others knowing. Purochan as told ,  set the palace to fire. But the Pandavas escaped from the palace which annoyed the Duryodhana. From the above thing we can easily say that Dharma is violated by Duryodhana as he wanted to get the empire and throne he tried to defeat his cousins and as he was not successful he did try to find unfair means of killing the Pandavas.
2.Karna’s Death:-
Karna was one of the greatest warriors whose martial exploits are recorded in the Mahabharata,Karna was the son of Surya and Kunti. He was born to Kunti before her marriage with Pandu. Karna was the closest friend of Duryodhana and fought on his behalf against the Pandavas his brothers in the famous Kurukshetra war. Karna fought against misfortune throughout his life . Many people admire him for his courage and generosity. Karna was a good archer as Arjuna . So as in the  world  one would a hate the people having more power  than onself . As Karna would get defeated by Arjuna so hatred developed in the heart of Karna. Karna had got boon and many curses from many Gods. He was also was given a boon to use the strongest weapon which could kill any one and it was obvious that he stored this weapon for killing none other than Arjuna but since Krishna knew that he adopted this technique. He asked Bhima to bring his son Gattothkach for fight as Bhima was told by his son Gattothkach that he would be there whenever his father needs him. Also he was asked by Duryodhana to make use of his weapon to kill him and so he had no other choice but to use his gifted weapon which he desired to use on Arjuna. During the battle between the two sides when it came as a fight between Arjuna and Karna the wheel of Karna’s chariot got stuck in mud. Also he was given a curse by some saint that he would forget also his knowledge of weapons when he would actually require it the most. So, he left his arms and got down the chariot in order to remove the wheel of chariot but all his attempt were in vain. He was armless and it is  the rule that one could not attack an armless warrior in the battle but then Arjuna killed him even though he was unarmed and this was the an unfair way of killing as it was against the rule of a war. Thus this led to the death of Karna due to the Adharma of Arjuna.

3.Abhimanyu’s Death:-
Another instance is of ‘adharma’ is when Abhimanyu , son of Arjun is killed illicitly. On the 13th day of battle, the Kauravas challenge the Pandavas to break the chakravyuh or circular battle formation. The Pandavas accept it since Arjun and Krishna knew very well how to do the required. But on that day, both of them got engaged in fighting at the warfront against another set of people. So, they had to send Abhimanyu for the challenge. Abhimanyu knew well how to break into the ‘chakravyuh’ but he did not know the tactics to move out of it. The remaining Pandavas decided to accompany him inside but could not break in as only Arjuna out of all Pandavas was allowed to break the chakravyuh.  So he was left alone to fight all. But owing to his valour fought them single-handedly. When he killed Duryodhan’s son, it enraged the Kauravas and they decided to trick him.  Karan went from behind and snapped his bow. Dronacharya attacked from the front and killed his horses and broke his chariot wheels. Abhimanyu continued fighting with his sword but the opponents break the code of war of one-to-one-fight and attach Abhimanyu in a group. Soon, he loses all his weapons and he is killed.
This incident shows how the Kauravas and their allies took support of improper ways of adharma to kill a armless man. The code of conduct was set to be followed by all. But they did not pay focus to it when it came to killing their enemy. Not only did the six persons fight a single person simultaneously but also they killed him when he did not possess any weapon to defend himself which was strictly against the code. If only had they followed the code, their attack would not have been inspired by ‘adharma’ and it would be possible that by following the right path they might have been successful in killing Abhimanyu.




Draupadi's question:Can a man who has lost himself loose somebody else?




The Mahabharata is a great hindu epic since ancient time which is based on the  Kurukshetra war and the Kauravas and Pandavas. The epic mainly describes about the war which lead to the formation of the great epic.The epic consists of about 74000 verses alongwith long prose passages.

       In the epic there is an event in which Duryodhana invited Yudhishthira for playing a dice game against his uncle Shakuni who was very smart in playing dice game. Yudhishthira accepted the invitation for the game. Shakuni wanted to play with Yudhisthira  as he had idea for trapping the Pandavas and all there possessions. Shakuni was playing from the side of Kauravas as he was sure that he will win the game. Although many insisted not to play the game, Yudhishthira still wanted to play the dice game.

       As decided the game started and one by one Yudhishthira started to lose but he still continued to play more. As the time commenced one time came when Yudhishthira had lost his state of Indraprasth, wealth, cows, crops and not only this but also  he lost his brothers one by one . Whenever Yudhisthira tried to back out, he would be taunted by Shakuni and his family people. Thus through this dubious game, Yudhisthira lost everything to his cousins. After that when he lost every thing to his brothers he had no other option but to bet on himself which also had the same results. Now he lost himself and nothing left to play but then Shakuni and Duryodhana gave them a golden chance which was indeed the biggest trap to make the bet on her beloved and beautiful wife  , Draupadi. Although Yudhishthira knew about the intention, he then also kept  his wife on stake. With Yudhishthira the same thing happended and lost his wife Draupadi. At this situation the question came by Draupadi   that was it possible that after losing onself how can one bet others. The answer is that as he had lost himself there was no other thing left .Moreover he had faith in her wife that she will support and can live with her.
Also he thought that as he has lost everything so there was no other option left with him. Indeed there was injustice done with Draupadi since it was the most fundamental rule of any game that one cannot play the game after being lost. Here also the same rule is being violated by Yudhishthira and the reason is simple that his brothers allow him to do so since they wereintersted in one more and the final defeat of Yudhisthira which would give them their destiny Draupadi. And also Yudhishtira thought that it would be better that she would remain with her and if he hasn’t bet her than she would not remain with her and there would be a possibility of losing her for throughout the life and so he took the risk of betting her.

Also although after losing Draupadi , she had to face many difficulties as injustice was done over her but as there was no one to support Lord Krishna himself came and saved her. Moreover as it wasn’t in the hands of Yudhisthira he couldn’t do anything. Also Yudhisthira may have thought that it would be better to bet her as he might win and not lose. Moreover the love towards Draupadi was so much that he didn’t want to get separated from her and so he might have thought that it was better to bet her. Draupdai must have not questioned Yudhisthira as it would be disrespect of Yudhisthira and would have remain quiet. Also Yudhisthira must have some or the other mindset due to which he must have bet her beloved wife. Although in the game of dice if one loose himself its not known that we can bet others but whatever Yudhisthira had done would have been right.


Thus by this way the Pandavas had to suffer by playing the game of dice but still the question asked by Draupadi was unanswered that whether the injustice done with her was’nt wrong?  But I really would say that there was no injustice done along with Draupadi because whatever Yudhishthira had done would have been right as she was her wife onlyand he might have though for some instance and than betted her. And also one should not have any questions on there elders as whatever they would do would be right for them.

Why did Peter Brook choose International cast for the Mahabharata



“The Mahabharata” is a movie directed by a foreign artist Peter Brook which initially was a 9 hours long play which was later converted into the movie in 1989.The movie exclusively explains about the great hindu epic Mahabharat. It involves the incidents about Kauravas and Pandavas. The great point of the movie was its cast. The director had chosen international cast for the movie.This showed that the epic is not only related towards the hindu people but also for the whole world.

He also used the international cast as he wanted the whole world to get involved and take interest in the great epic. Also by taking foreign casts he did wanted to add the flavour of hollwood due to their speech and act as it would be praised and liked all around the world . If the director had tried to choose only Indian cast than the movie would not attract foreign people and wouldn’t be much attractive as it is. Also he director has also taken an Indian artist so to balance both the sides. Moreover the main success of the movie is its story and acting which was the result due to foreign cast and so the people were eager to know and watch the movie.