My take on Holmes.. Mr. Sherlock Holmes...
Wednesday, August 4, 2010
Never was I an ardent book-worm to turn to classics. For good books are like rare wine and unfortunately I've tasted only a handful of them. For my reading habits get honed up only when I come to know about a best-seller. However, lately, I'd been sitting quite idle post my University degree, which compelled me to raid my bookshelf in the hope of getting something interesting to engage myself upon.
- The Speckled Band
- The Red-Headed League
- The Five Orange Pips
- The Engineer's Thumb
- The Adventure of the Beryl Coronet
"C" the intracacies
Sunday, May 30, 2010
The other day, one of my nerdy mates, Rajdeep had put forth this problem, which caught me on the back foot. Apparently, the problem appealed like a fundamental predict the output snippet, but the exact reasoning is yet to be found. Following is the code snippet with some steps, someone needs the explain the reason behind such a weird output.
//File name: googly.c
#include
int main()
{
int a,b;
a=((b=5)+1); //Line 2
printf("a=%d b=%d",a,b);
return 0;
}
As you would have expected Line 2 essentially reduces to two sequential statements, b=5 and then a=b+1 and you get the result 'a'=6 and 'b'=5;
Now try replacing Line 2 with the expression a=((b=5)++)and then try to compile using a standard C compiler and you would observe an compilation error. You might come across a logic to explain that error.
But the strange behavior doesn't end here, save the code with a .cpp extension, compile it with a standard C++ compiler & you'd be startled to note that the error is gone and the program runs seamlessly to produce the output as a='5' and b='6'.
I suppose there's some compilation issue that makes it happen, but need a succinct logical explanation to this. Your reasonings are awaited...
The Riches to Rag Story
Friday, April 30, 2010
The brouhaha over IPL is strong enough to stay in the hearts of every cricket maniac. However, this year IPL has been a nightmare for the persons acting as the backbone of the entire institution. Whatever, may be the issue, my sentiments associated with the game is strong enough which leads me to say IPL Must Stay Back at any cost, no matter whoever rules as the chairperson, irrespective of the filth and corruption associated with it.
30 days of Unpredictability and more...
Saturday, March 20, 2010
Its like around the World of Unpredictability in 30 days. Feb-2010 to March-2010 would probably be the fastest journey I've ever made till date. Unpredictability and confusion has bee the integral part of my life and career for, the past 2 years, but the past month was undoubtedly the most hectic of them.