Saturday, July 13, 2013

Frequently Asked Questions and Answers for Software Company Interviews in C Programming Language|Viva voce|Technical|Campus Recruitment

If you want to get placed in software companies after your B.Tech/Engineering degree education, you must be handy with programming languages. C is the pioneer of many programming languages namely C#, D, Go, Rust, Java, JavaScript, Limbo, LPC, Perl, PHP, Python, and Unix's C shell. It's essential to know the simple one word answers to the most frequently asked questions in interviews. Remember, interviewers often test your basic knowledge before leaping into advanced problems.

1. Which are the derived data-types in C?
Ans: Function, Array and Pointer.

2. What is size of long double in x86 architecture?
Ans: 80 bits 

3. What is the origin of short int?
Ans: In earlier days memory was very expensive. If the number being used is less than 128, then 1 byte was sufficient. Therefore, instead of using int, short int(8 bits) was used thereby saving memory.

4. What does the following mean in a C program?
expression1? expression2:expression3
Ans: If expression1 is true, expression2 is taken, otherwise expression3 is taken.

5. Distinguish between Lvalue and Rvalue?
Ans: The address associated with a program variable in C is called its Lvalue and the contents at that location are its Rvalue.

6. What would a=printf("Good") return?
Ans: Good4 
It assigns a with the number of bytes printed. Here it's four.

7. What does \r mean in a C program?
Ans: Linefeed(Linebreak)

8. To which value does C equate !2 to?
Ans: zero.
! any value except zero =0

9. What would ++(x+y) would return?
Ans: Compiler error.
This happens because ++(x+y) means x+y=(x+y)+1.
Expressions are not allowed on the Left Hand Side(LHS).

10. What would be the result of 8 && 3?
Ans: 1.
&& refers to 'logical AND'.
In logical operation, any value other than zero is considered TRUE(1).
So, TRUE && TRUE ='1'.

Wednesday, January 2, 2013

Akbaruddin Owaisi - A symbol of religious intolerance

It was sickening to understand that Akbaruddin Owaisi's hatred speech happened to be the first public speech I was listening to through YouTube in 2013. The content of the speech is ill-spreading, malevolent and therefore condemnable. The Majlis-e-Ittehadul Muslimeen (MIM) MLA appeared to be encouraged by the applause of his supporters on the course of delivering a speech. 

It's often the thoughts of a person reflected through his speech. It was so unsettling to see people cheering him up by raising slogans and waving flags,of course, not the Indian flag. 

In discussions where "right to speech" and "right to freedom of expression" are debated, I support them for these two rights help to reveal the truth hidden from public's view. The classic example I narrate is from the history of Science. There was a time the whole world was benighted with the thought that earth was the centre of the universe and that the sun was revolving around earth. When a few scientists spoke against it, the religious community condemned them for "hate speech" against their religious beliefs and accused them of blasphemy. Giordano Bruno was burned at the stake and is considered to the first martyr of science and a symbol of religious intolerance against free thought. Later, Galileo Galilei was coerced to apologize for his thoughts on the same idea. These examples indicate that the thought of majority need not be true,and until the veracity of an argument is validated no one has the right to prevent freedom of speech and expression. The same argument opposes the ban of Salman Rushdie's controversial book 'Satanic Verses' in India. Every idea must be given a space to be expressed. If you think it does not go hand-in-hand with your rationality or belief,which could be either religious or any other, you can argue against it by using your freedom of expression and not by pressuring the government to ban the book nor by declaring a death penalty for the author. Who knows, whose argument is correct? To paraphrase George Bernard Shaw, "Every great truth begins as a blasphemy". Before banning a book accusing blasphemy and saying that it hurts your sentiments, give a thought to the very opposite case. All the religious books tends to perpetuate the myth that those who do not believe in their God will end up in hell, after death. For instance, “The fool says in his heart, ”There is no God.”- (Psalm 14:1). From an atheist's point of view, these statements hurt his sentiments. Just like a religious person seeking the ban of the atheistic books, an atheist can seek the ban of religious texts. From a rational view, on would infer that this argument makes sense.

You might wonder, what the freedom of expression has to do with Akbaruddin Owaisi? It has, because he also has the right to enjoy the freedom of expression. He can make his own arguments against any person, provided it is done through parliamentary terms. eg: One can say, "The girl is a sex-worker" and not "The girl is a sl_t". If one does so, it must be considered a derogatory remark. Akbaruddin Owaisi can express his thoughts on Lord Ram, Narendra Modi and the the status of Islam in India. Nevertheless, that does not give him the freedom to urge his supporters to commit a crime. He does not have the right to prompt his supporters for a mass-slaughter and murder of their fellow beings, no matter which religion they belong to. I would say the same if a similar statement was made by any other person belonging to any other religious party that encourages killing somebody simply because they happened to be of a different religious background. This part of his speech is ill-spreading, malevolent and therefore condemnable. The principle of his party must be interrogated. If it's evil-motivated, it must be brought before the court's attention. 

In this new year, I have just one thing to say; Learn to see your fellow being as a human being notwithstanding his religion. If one things the other way around, he/she does not deserve a living in this millennium for his/her thoughts are extremely primitive and barbarian. Have a peaceful year ahead.