See C

Well having attended a few C debugging contests, I found C can get very interesting even at the very basic levels. Here is a few questions that are worth understanding if you got any interest in C :)

*)First is the simple printf statement. Consider
int i=5;
printf("%d,%d", i, ++i);

If you guessed output as 5,6 - sorry.

Thing is printf first evaluates all the expression from RIGHT TO LEFT before printing the actual values. So actual answer would 6,6.

*)Now the comma operator. They always asked questions involving this. I didn't even know what it meant till I saw this.

*)The playing with increment/decrement operator. Consider
i=5;
j=i+++++i;

If you split the second line as j= (i++) + (++i) and calculated the appropriate value, then congrats, you made the same mistake as me :)
Seems it actually gets divided into (i++) ++ (+i) so it becomes an invalid expression.

*)Problem is to print "Hello World" without a single semi colon in the program :D

Now I thought of macros,recursion,function calls blah blah blah but as always the answer was one hell of a simple solution.
Just put the printf statement in the if condition or for/while condition thing and job done :)

*)The mother of all C questions :D
int a,i=5;
int *b=&i; //Creating pointer to i
a = i/*b;
What is value of a?
If the answer 1 popped up in your mind (after all we divided a value by same value), ha ha ha! Compile,run and see :D

Naming Convention

It always makes me wonder how people can mess a name as simple as mine. Let me tell you what I mean.

My EDC mam thought my name was Sai Shankar.
HOD thought it was Shankar.
EDC Lab mam thought it was Sai Saravanan.
So did the other sec boys for sometime. :D
Apple lab mam thought it was Sarvesh Gautham/Sai Vignesh.
uP sir thought it was Sowmya Narayan.
OS mam thinks(still :D) it is Sai Krishna.

I even had a boy from the other sec come to me and ask earnestly "Dei unnoda unmayana per ennada?" Lol!

Note : My real name is Sai Santhosh :)


Shift+Delete


I have a drive full of movies. And soon I ran out of space. So I decided to remove few movies. Cars got shift+deleted. Next was Angels and Demons. But this popped out an error. "The file does not exist in the system" or something very similar to that. I tried deleting the folder again. Same error. I restarted my system. The error didn't change. I couldn't understand what was going on. How could the file not exist??? I mean, it was right in front of my eyes.

I googled and found many strange solutions for this strange error. I tried many of them but in vain. I tried to create a rar file out of it and encountered same error. Yet the movie inside the folder ran perfectly fine. This kept me wondering for a few days. Then I did what I always do under these circumstances.

Restart. Go to Ubuntu. Mount the media. Now I tried Shift+Deleting the file. Angels and Demons was deleted successfully. What Windows failed to do, Ubuntu accomplished without a fuss. Ofcourse I still don't have a clue why that error came. But from experiences like these I have learnt something.

If something doesn't work in Windows, try in Ubuntu.
If you want to do something, try Ubuntu.
If it doesn't work in Ubuntum it's not worth doing.

Ode On Friendship



When I was born, I inhertied my family
And all my childhood it was all I had;
I can't forget how times passed happily,
For I always had my mom and my dad.

Then as time passed new problems awoke,
I knew not how to speak on this to them;
Then something called friendship arose,
I felt like I was on the world's helm;

I know now that friends are not inherited
And that you gotta be lucky to find real ones;
To lose them would make our hearts devasted,
For they show us the reality of life's essence.

With friends around, one can rule the world,
Atleast that is what they can make us believe;
All my life around me they have swirled,
I only wish to repay them before I am to leave.

IV To Ooty :)

Just a small poem about my dept IV. I haven't gone into any specific details of the trip, just an overview :)





The IV started on the 9th of July,
Into the sky did the crackers fly;
Our industrial visit was to Ooty,
For it was finally time to party!

An hour before midnight we started,
Into two big buses were we seated;
The drive at night didn't scare us,
Cos all the dancing made it no fuss.

It was drizzling when we saw our hotel,
Ah, the chilling climate had a lot to tell;
All day we were shivering under the sky,
Yet somehow all our moods were on a high.

All the places we saw had their own view,
I cannot fathom how fast the time flew;
We all danced to tunes, even the shy ones,
The questions session involved many a puns.

With many sighing hearts did the buses return,
The trip to ooty cannot easily be forgotten;
The co ordinators had done one hell of a job,
Remembering reguar classes all I can do is sob.

Square Root Of 3

This is a direct rip from the movie Harold and Kumar Go To White Castle. It is a poem recited by Harold in the climax. I know it sounds geeky but hell, I like it :)

I fear that I will always be
A lonely number like root three
A three is all that's good and right
Why must my three keep out of sight
Beneath a vicious square-root sign?
I wish instead I were a nine
For nine could thwart this evil trick
With just some quick arithmetic
I know I'll never see the sun
As 1.7321
Such is my reality
A sad irrationality
When, hark, just what is this I see?
Another square root of a three
Has quietly come waltzing by
Together now we multiply
To form a number we prefer
Rejoicing as an integer
We break free from our mortal bonds
And with a wave of magic wands
Our square-root signs become unglued
And love for me has been renewed.

News? Do Not Kid Me!

We live in times were almost every news seen/heard is manipulated so much that the very reason for those news channel seems to be in no longer delivering news but getting more ads. Here are few such instances.

*)What They Reported :

"American President advices Americans to not travel to India". Mr.Chidambaram "talks tough" saying "We will ask their government to retract their statement as India is a secure country".

I saw this news and was amazed for such a statement from their President would do no good in improving the relationship between the two countries. Then they showed the actual videos of what the two people had said.

What Actually Happened:

American President tells Americans in India to be always alert and keep a low profile due to the recent terrorist activities in our country. (No mention of "Don't go" there). Our Home Minister when asked about this said "I am not aware of any such statement. If they given such a statement we will tell them to take it back".
After a few hours the "If" part was cut out and only the "Take it back" was shown. And they ran this piece for the full day!

*)What They Reported :

"Dhoni loses cool : The Sehwag Injury Fiasco"
"Sehwag hid his injury on his shoulder from the BCCI and the Captain and it was akward for Dhoni when details of the injury was asked. This happens after Dhoni reportedly clashed with his Vice-Captain Sehwag.Dhoni then lost his calm..."

Then a video where a reporter blamed Dhoni for leaking the news. Dhoni - coolly - asked him "Are you blaming? No, you just said I leaked the news in front all these people. So are you accusing me?..." Ofcourse after an hour all this was cut out. Only the "Are you accusing me" bit was shown with other videos of ppl diving in the recent IPL. Hmm

What Actually Happened:

Sehwag got injured in IPL. Everyone hoped he would recover in time. He didn't. So the injury was revealed. So all that happend was an injured player was sent back to India. This piece of news ran for quite a few days!

*) I got this as a forward in my cell :)

"Sun News has put this as a "breaking news" : 'Masilamani is great hit' in their channel. Is this really a news? What a pathetic situation."

Thank God there a few -very few actually- who still try and deliver the actual news. Cheers to them for honesty and others for imagination.