"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...

Read more...

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.


With that, I don't want to mislead the readers, I'm not here to put my opinion behind the IPL issue,for debate on that issue, every Indian News Channel is doing better in dissecting every inch of it. Rather I'm to put forth a humorous condemn report "The Riches to Rag Story". It goes like......

Prior to being caught red-handed:

"Mr. Lalit Modi was surrounded by Preity Zinta,Shilpa Shetty, Deepika Padukone & the respected Shahrukh Khan.... This was coined as THE AXE EFFECT!!! "



After his empire got busted
"Mr. Lalit Modi is now being surrounded by top-brass Income Tax Officers!! They call it the...........
TAX EFFECT!!!! " LOL!!


Read more...

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.


With my ailing father suffering from acute renal failure, I had to leave for Chennai on the end of January 2010 for his immediate treatment. That was the first instance when unpredictability started following my footsteps. The domestic flight we availed to reach Chennai underwent a mid-air technical snag, that left us stupefied until it got grounded. Well there was more to that, the flight ultimately helped us reaching our destination at 2 am in the night leaving us stranded at the airport until daylight. Finally the treatment commenced and the results wasn't really positive. Somehow, that unwanted journey came to end.
Received glitters of hope on reaching home with the notification that campus drive is round the corner. Naturally, I started working on it steadfastly until that unwanted notification arrived that it got deferred. With that, I was like thrown up in the air, without even a parachute. What came as a blow was the notification of the semester which was to be held in a weeks time,things were completely in a mess. However I managed to divert my course of action to work for the new objective, the so called Semester a.k.a the Rat Race. With zero preparation, I's fearing a massive ordeal with the papers, especially VLSI but somehow the exams were through, beyond my horrendous expectations. Still unpredictability prevailed. The results got published which left me shattered into innumerable pieces... In fact I kept abusing my respected profs for the entire week, for honoring me with those undeserving scores. Still, I's right back on my feet to look up to the next objective, campus recruitment-yet another Rat Race.

The three-day long campus recruitment process was yet again an instance of uncertainty. The initial aptitude test went haywire when my verbal abilities was questioned with alien like words and passages. I still doubt how we all managed to see through that test. But the day following it. was the most disheartening and
unpredictable one. People who never cared for the job got selected and some who'd put in their heart and soul in it were left out. It literally left us into tears, it was indeed an out-and-out injustice and a manifestation of the unpredictability associated with the corporate world!

Bagging a job is just another beginning to a new series of unpredictability, that's what my realization is, coz the day is not far when I might get fired despite my technical skills although a non-tech ass*** would still carry on with a job, which he's not meant for.....

I can sense more is coming up on this unpredictable journey ahead and unfortunately I've no plan as an alternative.....

Read more...

  © Blogger templates Newspaper by Ourblogtemplates.com 2008

Back to TOP