• CpjJwWHV asked a Query 14 years ago
    /*#include
    main()
    {
    long nc=0;
    while(getchar()!=EOF)
    {
    ++nc;
    printf("%ld\n",nc);
    }
    }*/

    #include
    main()
    {
    double nc;
    for(nc=0;getchar()!=EOF;++nc)
    ;
    printf("%.0f",nc);
    }

    CpjJwWHV   print a number that is equal to the size of the file.
    14 years ago

    Smiley



  • CpjJwWHV asked a Query 14 years ago
    AGAIN A BRAIN TEASER
    THERE IS A STONE OF 40 Kg. IT HAS TO BE DIVIDED INTO FOUR PARTS(INTEGER TYPE) SO THAT ONE CAN WEIGH 1Kg, 2Kg, 3Kg, 4Kg,.............UPTO 40Kg BY ARRANGEING THE FOUR PARTS OF STONE
    AT A SINGLE TIME i.e U CAN NOT WEIGH ONE MATERIAL TWICE OR THRICE OR MORE USING A BALANCE.
    CpjJwWHV    thanx alok
    14 years ago
    CpjJwWHV   @sanjeev kumar ur questions r really good...plz go ahead
    14 years ago

    Smiley



  • CpjJwWHV asked a Query 14 years ago
    A BRAIN TEASURES:::::::::::::::::::::::::::::::
    A goes to a shop & buy a pepsi of Rs20. A gives 100 rupees note to shopkeeper B.
    B doesn't have change so B went to C to get change. Now B returns Rs80 to A and a pepsi. Later C comes to B & says that 100 rupees note is fake. So B had to give Rs100 to C. NOW what is the total loss of B?
    CpjJwWHV   @ajay thanks:)
    14 years ago
    CpjJwWHV   can anyone tell when is TCS offcampus for 2011 batch????
    14 years ago

    Smiley