Monday, August 31, 2009

The ANSI C Programming Language

I have been reading the book 'The ANSI C Programming Language' from 'Brian W.Kernighan & Dennis M.Ritchie'. It is very excellent. I would recommend it once you get some hands in to C language. It does not beat around the bush. A MUST READ FOR A C PROGRAMMER.

Some interesting notes are -
1. '\n' represents only a single character. An escape sequence is used for hard to type or invisible characters.
2. The range of both int and float are dependent on the machine .
3. printf is not part of the C language, it is just a useful function from the standard library of
functions that are normally accessible to C programs and its behaviour is defined by ANSI
std.
4. EOF is an integer defined in
5. An isolated semicolon statement is called as Null Statement
6. A character represented within a single quotes gives numerical value. Ex - '\n' is equal to 10.
7. getchar returns ascii value of character being read.
8.when a string constant like"hello\n"appears in a C program, it is stored as an array of characters containing the characters in the string and terminated with a '\0' to mark the end.
The %s format specification in printf expects the corresponding argument to be a string represented in the above form.
9.An external variable must be defined, exactly once, outside of any function; this sets aside storage for it. The variable must also be declared in each function that wants to access it; this states the type of the variable. The declaration may be an explicit extern statement or may be implicit from context.
10. ''Definition'' refers to the place where the variable is created or assigned storage.
``Declaration'' refers to places where the nature of the variable is stated but no storage is allocated.

C Interview Questions - 100

Hi,
This is a compilation of selective & tricky 'C' questions from internet/FAQs/Dumps so that it could be beneficial for everyone during various scenarios like interviews/exams/quiz.

1. In order to assign attributes to the pointer itself, rather than to the pointed-to object, you put the attributes after the asterisk. like ' char *const p = &c; ' - True/False
Answer - True. It is a const pointer to a char.

2. What is the output of the below code ?
char **p ="Hello";
printf("%s",**p);
return 0;
Answer - Error message 'cannot convert from 'char [6]' to 'char ** ' '

3. There is a char * pointer that points to some ints, and what should be done to step over it ?
Answer -
Consider p is the char * pointer.
int *ip = (int *)p;
p = (char *)(ip + 1);

4. What changes has to be done to get the ouput as "9 8 7 6 5" by the same recursive call
method ?
int main(void) {
int i=9;
printf("%d \t",i--);
if(i)
main();
return 0;
}
Answer - Define 'int i =9' as 'static int i =9'

5. What is the output in the below program ?
void main() {
int z = 12;
printf("%d",printf("Mr.123\\"));
printf(”%d”,printf(”%d%d%d”,z,z,z));
}
Answer - Mr.123\7
1212126
The printf() returns the number of characters sent to the standard output device.

6. You can't 'shift' an array - True/False
Answer - False

7. Is it possible to do like this in C ?
char s[8];
s="ABCD1234";
Answer - No. It is not possible.

8. bit-fields do not provide a way to select bits by index value - True/False
Answer - True

9. Does 'char *a' allocate some memory for the pointer to point to ?
Answer - No. It allocates space only for the address and not for the info that it is pointing to.

10. A null pointer is does not to point to any object or function - True/False
An uninitialized pointer might point anywhere - True/False
Answer - True, True

11. The address of operator will never yield a null pointer - True/False
malloc returns a null pointer when it fails - True/False
Answer - True, True

12. char y[] is not identical to char *y - True / False . Explain the reason for either true/false.
Answer - True.

13. What would be output of the below code ?
char x[] = "abcde";
char *y= "abcde";
printf("%c \n", x[3]);
printf("%c \n", y[3]);
Answer - Both will give the same output.
The array declaration char x[] requests that space for six characters be set aside in the name 'x'
The pointer declaration requests a place that holds a pointer to be known by name 'y'

when the compiler sees the expression x[3], it emits code to start at the location ``x'', move three past it, and fetch the character there.
When it sees the expression y[3], it emits code to start at the location ``y'', fetch the pointer value there, add three to the pointer, and finally fetch the character pointed to.

14. Is it possible to have char x[5] in one file a declaration extern char * in other file ?
Answer - No . It is not possible. In one source file you defined an array of characters and in the other you declared a pointer to characters. C does not allow this.

15. What is dangling pointer ?
Answer - The pointer that does not point to a valid object. Dangling pointers arise when an object is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory. That is, sometimes if a pointer is freed but not assigned NULL or 0, it becomes dangling as it might still point to the memory location of freed memory even though it does not have the data. And if the program tries to derefernce it , unpredictable behavior may result.

16. Why does the below code cause segmentation fault ?
int* z = NULL;
*z = 1;
Answer - The pointer z is initialized to NULL and hence It points to memory address 0x00. Dereferencing it will give a segmentation fault.

17. What are the two problems in the below code ?
char *s1 = "Hello, ";
char *s2 = "world!";
char *s3 = strcat(s1, s2);
Answer - s1 is in read-only memory which therefore cannot necessarily be modified. If s1 is declared as an array, it should have the size to accomodate s2 also.

18. What is the problem with the below code ?
i) char a[] = "Hello";
char *p = "Hello";
My program crashes if I try to assign a new value to p[i].
Answer - p is in read-only memory which therefore cannot necessarily be modified.

ii) char *a = "abcdef";
*a = 'X';
Answer - Same as above.

19. Some compilers have a switch to control if string literals are writable or not - True/False
Answer - True

20. Three attributes can be assign to a pointer: const / volatile / restrict - True/False
Answer - True. Yes, these are attributes.

21. What are the problems in below code. How will you fix it ?
char *check(int n)
{
char box[20];
sprintf(box, "%d", n);
return box;
}
Answer - box cannot be returned as it points to an array that no longer exists. One temporary fix can by declaring the box as 'static char box[20]'.

22. What is malloc's internal bookkeeping information and how does it play a role in mis-directing the location of the actual bug ?
Answer - malloc sometimes allocate one by extra rather than the actual amount of memory requested . This extra memory is the internal bookkeeping information for malloc's internal operation. Sometimes if you overwrite this area alone, it will not impact immediately, it might get affected during some other call as it has affected the bookkeeping information earlier.

23. Where would you use 'const int' instead of #define and where should you use #define instead of 'const int' ?
Answer - If you want to do more of debugging you need to use 'const int' rather than #define.
Also,if you have some memory available then you can use #define as it saves memory.
If you want to protect the variables inside the function, then it can be done by declaring the function parameters as const.

24. Keyword 'const' refers to read-only -> True/False
Answer - True

25. What is the output of the below code
#define MY_CALCULATOR 2+5+6
printf("%d \n" 3 * MY_CALCULATOR);
Answer - 17

26. How does declaring function parameters as 'const' help in better,safer code ?
Answer - It does not allow the corruption of the data inside the function.

27. Which of the following is correct . Why does point no 'i' gives output sometime & sometimes it does not give output ?
i. char *a = malloc(strlen(str));
strcpy(a, str);
ii. char *a = malloc(strlen(str) + 1);
strcpy(a, str);
Answer - Option number 'ii' is correct as strlen does not count the '\0'. So, it must be taken into consideration while allocating memory using malloc for 'a' before copying using strcpy.

28. How do the below get expanded ? Which one is the preferred method & Why ?
#define mydef struct s *
typedef struct s * mytype;
mydef d1,d2;
mytype t1,t2;
Answer - Both get expanded correctly as 'struct s *'. But, 'struct *s' applies for only the first variable in the case of '#define' and it applies for both the variables in the case of 'typedef'.

29. i. const values cannot be used in initializers - True/False
ii. const values cannot be used for array dimensions - True/False
Answer - True, True

30. Is char x[3] = "wow"; legal ?
Why does it work sometimes ?
Answer - It gives an undefined behaviour. Working fine is also a kind of undefined behaviour.

31. How will the below code corrupt stack ?
void checkstackcorruption (char *var)
{
char z[12];
memcpy(z, var, strlen(var));
}
int main (int argc, char **argv)
{
checkstackcorruption (argv[1]);
}
Answer - It has 2 important things. If the user enters more than 11 characters then it will cause stack corruption as 'z' has the capacity for only 12 characters. It is only 11 characters because it will have the '\0' at the end and strlen does not take the '\0' into consideration.

32. Is the below method of usage of realloc() correct ?
void *z = malloc(10);
free(z);
z = realloc(z, 20);
Answer - No. You should not free before reallocation.

33. What does the below mean ?
int (*)[*];
Answer - pointer to a variable length array of an unspecified number of ints,

34. The rank of any unsigned integer type shall equal the rank of the corresponding
signed integer type, if any - True/False
Answer - True

35. The rank of long long int shall be greater than the rank of long int which shall be greater than int - True/False
Answer - True

36.No two signed integer types shall have the same rank, even if they have the same
representation - True/False
Answer - True

37. sprintf function is equivalent to fprintf, except that the output is written into an array - True/False
Answer - True

38. Incase of both sprintf and fprintf , A null character is written at the end of the characters written and that is not counted as part of the returned value - True/False
Answer - True

39. Arithmetic underflow on a negative number results in negative zero - True/False
Answer - True

40.Negative zero and positive zero compare equal under default numerical comparison - True/False
Answer - True

41. 'type cast' should not be used to override a const or volatile declaration - True/False
Answer - True. Overriding these type modifiers can cause the program to fail to run correctly.

42. 'sizeof' yields the size of an array in bytes - True / False
Answer - True

43. How will you determine the number of elements in an array using sizeof operator ?
Answer - divide the size of that entire array by the size of one element of that array.

44. What is l-value & r-value ?
Answer -
In C, the term L-value originally meant something that could be assigned to (coming from left-value, indicating it was on the left side of the = operator), but since 'const' was added to the language, this now is termed a 'modifiable L-value'.
The L-value expression designates (refers to) an object. A non-modifiable L-value is addressable, but not assignable. A modifiable L-value allows the designated object to be changed as well as examined.

An R-value is any expression that is not an L-value, it refers to a data value that is stored at some address in memory.

45. What is the output of the below code ?
char (*x)[50];
printf("%u, %u,%d\n",x,x+1,sizeof(*x));
Answer - Address of x, Address of x + 50, 50

46.How will you declare & initialize pointer to a register located at phys addrs 600000h ?
Answer - int * pPhyRegister = (int *) 0x6000000;

47. What is NPC ?
Answer - Null Pointer Constant

48. Can we compare a pointer and integer ?
Answer - Not recommended. gcc compiler will throw a warning message if we are comparing with non-zero interger values. But, while comparing a pointer with an integer value of zero , it would consider the zero as NULL pointer constant and hence does not throw warning.

49. Why does *ps.i do not work in the below code ?
struct rec
{
int i;
float f;
char c;
};
int main()
{
struct rec *ps;
ps=(struct rec *) malloc (sizeof(struct rec));
*ps.i=10;
free ps;
return 0;
}
Answer -
It should be as (*ps).i

50. The term 'Pointer to pointer' is different from the term 'double pointer' - True/False
Answer - True.
Pointer to pointer - **a;
double pointer - double *a;

51. What is the size of a boolean variable ?
a. 1 bit
b. Depends on system memory
c. 1 byte
d. Dynamically allocated based on the memory usage by that particular program
Answer - c

52. Why does it overflow inspite of having 'long int' ?
int x = 6000, y = 6000 ;
long int z = x * y ;

Answer -
Here the multiplication is carried out between two ints x and y, and the result that would overflow would be truncated before being assigned to the variable z of type long int. However, to get the correct output, we should use an explicit cast to force long arithmetic as shown below:
long int z = ( long int ) x * y ;

53. The string function strcat( ) concatenates strings and not a character - True/False
Answer - True. The below will not work.
char str[ ] = "Hey" ;
strcat ( str, '!' ) ; // character within single quotes
But, the below will work,
char str[ ] = "Hey" ; // string within double quotes
strcat ( str, "!" ) ;

54. Function calls are allowed in initalizers for automatic variables that is local or non-static - True/False
Answer - True

55. Any number of pointers can point to the same address - True / False
Answer - True

56. Can you assign pointers to one another pointer of the same datatype ?
Answer - Yes. The address gets copied from the RHS to LHS during this assignment.

57. What is the problem in the below code ?
int main()
{
char *a;
a=(char *) malloc (100);
a="checking";
free(a);
return 0;
}
Answer -
a is pointing into the string constant table, the string cannot be changed;
But, free fails because it cannot deallocate a block in an executable region.(That is, 'a' is now pointing to a different thing completely).

57. memmove is better than memcpy - True / False.
Answer - True

58. How can will you avoid fixed-sized arrays?
Answer - Use malloc
#include
int *dynarray;
dynarray = malloc(10 * sizeof(int));
Now, you can reference dynarray[i] ('i' can be from 0 to 9).

59. Difference between memcpy and strcpy ?
Answer -
a. strcpy takes only char * as arguments.
memcpy takes void * as arguments. It can be used for arrays of any type.
a. memcpy copies the number of bytes specified.
strcpy copies until a 0 (zero) / Null character is encountered
b. memcpy replaces the whole contents in the destination.
strcpy replaces only the specific number of characters/contents got from the source. The
remaining will be present after the copied characters/contents in the destination.

60. What does the below code do ?
i. x = x+y; y = x-y; x = x-y;
ii. x = x^y; y = x^y; x = x^y;
Answer - Both perform swapping of values of x and y.

61. What will be present in box2 and how to overcome the problem ?
#define LEN 10
char box1[LEN] = "c";
char box2[LEN] = "_Quest";
strcpy(box2,box1);
Answer - box2 will have 'cQuest' . Use memcpy to avoid the box2 from having the other unnecessary stuffs at the end after strcpy.

62.

70. What is the output of the below code ?
int main(void)
{
int a[]={ 11,22,33,44,55};
char*p=(char*)a;
printf("%d", * ( (int *) p+4));
return 0;
}
Answer - 55

71. In the below code, what is the alternative for (*p).i ?
struct rec *p;
(*p).i=10;
Answer - p->i=10

72. What is the output of below code ?
p = 0;
*p = 5;
Answer -
This demonstrates the problem due to dereferencing a zero pointer reference.
The program will normally crash. The pointer p does not point to any block, it points to zero, so a value cannot be assigned to *p. The system will generate error messages if you happen to dereference a zero pointer.

73. Why does this program crash sometimes only ?
int *p;
*p = 8;
Answer -
This is a famous example for demonstrating the problems with uninitialized pointer.
When you say *p=8;, the program will simply try to write a 8 to whatever random location p points to. But, the pointer p is uninitialized and points to a random location in memory when you declare it. It could be pointing into the system stack, or the global variables, or into the program's code space, or into the operating system. The program may explode immediately, or may wait half an hour and then explode, or it may subtly corrupt data in another part of your program and you may never realize it. This can make this error very hard to track down. Make sure you initialize all pointers to a valid address before dereferencing them.

74. The inline directive will be totally of no use when used for functions that are -
i. recursive
ii. long
iii. composed of loops
iv. All of the above
Answer - iv

75. What is the difference between Inline and Macro ?
Answer -


Credit - C-FAQ, C discussion groups & internet.

Sunday, August 30, 2009

Ohayo Gozaimasu

Good Morning(Ohayo Gozaimasu),
Soon, posts will be provided in Japanese & French too. It has been almost 3 years that i have not looked into Japanese lessons. I have decided to spend 2 hours every week and later make this blogspot multi-lingual. I will also share some important phrases while i re-visit it.

Here, we go...
Let me start with the basic info about Japanese. It has 3 scripting languages - kanji, hiragana and katakana. And interestingly, they address the people-name with the family name followed by the first name & finally the Mr/Miss.

Lets start with few simple greetings & expressions that we do in our daily life :-
Ohayo Gozaimasu -> Formal way of Good Morning
Ohayo -> Informal way of Hello (Japanese people mostly dont like this type)
Konichi Wa -> Good Afternoon
Konban Wa -> Good Evening
Oyasumi Nasai -> Good Night
Hajimemashite -> Nice to Meet you
Hai -> Yes
Yoroshii -> Good/Nice (Formal)
Dozo -> Please
Sumimasen -> Excuse me
Sayonara -> Bye

Let me introduce you to few of the pronouns also :-
Watashi -> I
Anata -> You

Little bit of Grammer too :-
Desu -> iam, tobe , you
ka -> are

Saturday, August 29, 2009

Vinayagar Chathurthi

Today, i got some sketch pens of Faber Castle brand in BDA Complex . I checked for the paint box , but it was not available. I came up with a small greeting card for 'Vinayagar Chathurthi'.

This was also drawn directly in one shot using the sketch pens without doing any kind of initial pencil drawing :-). I felt very much exited & enjoyed drawing this.

Vinayagar chathurthi is a famous Hindu festival in India. It is the Birthday of Lord Ganesha(Elephant headed God). He is worshipped first before any form of God . Whenever you enter a temple, you will find Lord Ganesha to be the first God before any other God/Godesses. It is celebrated very grandly in Maharashtra. People throughout India make lot of sweets. It is good business time. Some will buy/make big idols and immerse in the river/sea to represent the cycle of creation & dissolution in nature.

People worship him before beginning any activity.

Interestingly, i have started the activity of Drawing with his Greeting card without my own actual intention . Sometimes, God will sit in your tongue/mind and somehow he has been in my mind that i have started this activity with Lord Vinayaga without my actual intention :-) Thankyou Lord .

Happy Vinayagar Chathurthi !

Friday, August 28, 2009

The Dragon & Apple Tree


'An Apple a Day keeps the Doctor Away' & It seems that even the dragon is aware of it :-)

With this tiny post, i have started the journey of drawing ... Zooooooooooooooooooom !!

Today evening, i missed my bus and hence went to the library. I initially checked few technical books. But, well, it was boring as i have already spent lot of time from morning in technical stuffs. So, i tried out some cartoons after a very long time. I never thought that i would be having the drawing-touch while i started with the dragon . But, slowly within few minutes, i realized that i still have the magic-touch in me. The feeling was something like, i have this skill by default in me. I did not use an eraser while drawing this. 'The dragon & apple tree' was drawn at a single shot in 25 minutes timeframe.

Lemme know your comments !

Thursday, August 27, 2009

A Stylish Motorcycle

Harley Davidson is opening an indian division of its unit by tomorrow. I checked out their US website to get a feel about the models. It is simply fantastic. I find it very stylish . I like the 'cvo ultra classic electric glide' .The specifications look very interesting. It has a Radio system, Heated hand grips for riding in cool climate(Much suitable for places like Bangalore,Hosur) and i am really carried away with the heat adjustments in the rider & passenger seats. It has 6 gears & passenger backrest (Made of leather and it looks like a mini-sofa). This motorcyle model costs around $35,000 as of today (From their US website).

Now, there are lot of questions in Mind :-
- The entry price in India
- Will it support all the features or the models will be downscaled while selling in India
- What kind of models will be available in India
- Will it be successful among people of India
- Will it be able to adjust to the Indian Road/Traffic conditions
- Will it be popular in North/South/East/ West part of India

Lets wait and watch in http://www.harley-davidson.in/ !!

Wednesday, August 26, 2009

Painting

Long Long ago, there was a boy who drew lot of cartoons and filled many notebooks. He intially drew a Sun rising between 2 mountains. He learnt initially from his mother. Later he g(d)rew a Coconut tree near mountains with a House beside the river bed with boat. His trademark was 4 people with round head & stick-like legs/hands will be present in most of his drawings & 4 birds will be flying over the house/trees. Initially, to develop his drawing skill, knowingly/unknowingly he was trying to replicate some drawings/personalities . Later he started to draw real stuffs & tried to get perfection . His father identified his interests and joined him & his brother to Painting & Swimming course during the summer vacation. There he learnt to use brush, mix colors & did painting on charts. It enabled his transition from his notebooks to charts. If i could remember correctly, his first chart painting was a 'Pot with shadow on the floor'. He started to make his own greetings cards based on chart with his painting . But, once he joined college he did rarely look back into painting. Now, he is looking forward to start his favourite activity of painting ! That boy currently finished typing this tiny post :-)

Financial Intelligence

I got Robert Kiyosaki's book titled "Rich Dad, Poor Dad: What the Rich Teach Their Kids About Money--That the Poor and Middle Class Do Not!" . The book gives insight into Financial Intelligence & Financial Freedom. The author explains the need for making the 'Money To Work For Us' and 'Not To Work For Money'. He compares the thoughts & actions of the Low/Middle Class People with the Rich People to convey the methodologies to get rich. He narrates by using a Rich Dad who creates money and Poor Dad who works for money. One dad struggled to save even little amount of money . The other simply created investments.

But, i do not agree that all rich dads and poor dads are as portrayed by the author. Only, poor people can become rich . So, only if the poor dad has the quality of the rich dad as portrayed by the author, they can become rich. Rich people can become More richer only. A rich dad with the quality of the rich dad as portrayed by the author can make them More richer only :-)

He correlates the life to a 'Rat Race' made of 3 points that gets looped in life -
1. Fear - This is present initially for survival & that will drive ones earning requirement,
2. Greed - The later desire to get many nice things & greed drives the earning requirement.
3. Earn more - Pay more Bills . To pay more, earn more.
The only way to get out of this Rat Race is by using the Accounting & Investing.

I agree that switching to a big pay job and earning More Money cannot solve problems, Given more money, one will enhance his lifestyle & increase his needs & pay more bills & might also get into debt. Thus enters into Rat Race.

He stresses the need for 'Financial Intelligence' by having a complete understanding over the Income Statement, Asset Cash Flow Statement & Balance Sheet.

He says that we should never be arrested by Money such that we need to surely work to lead our life & we should avoid a situation of working at a job just because of fear for paying bills.
He states that we should have automatic Cash Flow From Asset -
1.A business owner who has a system in place can leave the business to a manager and still earn income.
2.A web site owner can stop working on the site and still earn income (e.g. from “automatic” advertisements like Google AdSense).
3. A book writer can stop writing and still earn royalties from the books she has written.

His examples for teaching the difference between 'Real Asset' and 'Liabilities' are good.
Asset - Automatic money/income generators
Liability - Home for middle class. It is not a asset if on loan. Car is never an asset.

Real Asset - Patents ,Investments (MFs, other bonds ..), Others work for you and you need not spend time to get the money (Amway / Quixtar), Mutual fund, Stock Business tools or equipment, Real estate (from which you earn rental income), Education

His concept of stock value getting increased whenever a company downsizes its resources appears strange to me though he substantiates stating that people like company that has low labor costs.

He also stresses the needs to achieve 'Financial Freedom' by asking the below questions -
Ask yourself - 1.For whom are you working for ? 2.Whom are you making rich ?
He tells us to have our own second level job along with the mainline job. His idea to join MLM to get trained in Marketing/Sales to get over fear of failure is interesting.

He also cautions by saying 'Mind your own Business' (continue with your wages based job and save to the maximum) and not to jump into business unless you are completely aware/convinced about it.

His 10 steps for awakening the financial genius are excellent.

I think, he can give more indepth information for Financial Freedom/Intelligence.

This book is simple & excellent ! The info conveyed are very practical and useful . I recommend it for everyone.

Amoeba bowling & Three Quarter Chinese restaurant

We went to amoeba in Church Street(Bangalore) . Amoeba has excellent entertainment facilities. It remainds me of entertainment zones in foreign countries. The amoeba's infrastructure deserves appreciation. There is a 12-lane bowling alley stadium, excellent food court, electronic games and much more. We divided into teams and took different lanes. In the middle of second game, almost everyone felt very hungry but our exitement overcame hunger. We had dinner in 'Three Quarter Chinese Restaurant'. It had provision for an individual room that could acommodate 16 persons. The food was good , but costly. Few of our friends have dined in 13th floor restaurant that is just opposite to Amoeba. The open-air dinner environment along with a bird's eye view of Bangalore was fantastic. The place looked very good, but it gets filled up quickly ! It seems that the buffet(afternoon) is cheap & good but the food was costly !!

The charges vary for weekdays & weekends. The cost & crowd are low if we go in the morning during weekdays(Monday to Thursday). The evening hour cost also varies based on weekday / weekends. It is a good place to hang out with friends !

Also visit my another blog on Bowling in Chennai - 'Down Under Fun' .

I figured out that the below two options are most commonly followed among various people while going for a 'personal treat'/'team outing'. Some feel that,
1. Before lunch is the best option. Have lunch in three-quarters/13th floor near amoeba, do bowling, get back to office and travel in office bus to house. Later, try and work from house to complete the tasks for that day :-)
2. Evening is the best option. Go directly to bowling from office on a fine evening by around 6 pm, have dinner and travel back to house in cabs :-) . Tell about the evening fun-time in house and go to sleep :-)

Well, you can also share your views about bowling as a 'treat'/'team outing' event on weekdays in the form of comments to this blog !

Sunday, August 23, 2009

Negotiation

I got 'Secrets of Power Negotiating' by Roger Dawson. It is simply 'Brilliant'. The negotation tactics are explained with simple examples from our daily life incidents.

He not only teaches tactics like Nibbling, Principle of Higher authority, Good guy Bad guy, Relecutant buyer, Flinching , Trade-off, Withdrawn Offer, Walk away trick & many others, He also teaches the counter tactics for those tricks.

He emphasises the need for 3 stages in negotiation (Get expectations,Get information & Agreement) and the advantage of being the person writing the contract.

The need for always being a Relectunt buyer following a Flinching policy with the Walk Away mindset and cutting short the negotiation range with the first question to the counterpart is very true.

The PuppyDog, Decoit and Red Herring principle made me laugh and are very practical.

He explains the various types of power that a person can have and states the necessity to identify the power that controls us and being prepared for it during negotiation. He also tells the kind of powers that can make a person very important in the negotiation.

He reinstates the need for collecting more info about the counterpart before negotiation and also during the negotiation with Open Ended questions. The use of time pressure tactic is really interesting.

His analysis of 4 personalities like pragmatic, extravert, amiable & analytical is very excellent and deserves credit. He conveys that it is necessary to know the personalities in first few minutes of the negotiation and use statements / decisions according to that personality to arrive at our favourable agreement.

His ability to give examples from negotiation between countries, teacher & student, owner & tenant, shopkeeper & customer, hotel management & customer, employee & employer, door-seller & resident and among the family members makes him a very good negotiator at all levels.

It is a very practical & useful book for everyone !

Sunday, August 16, 2009

Defusing Anger

I came across '21 Ways to Defuse Anger and Calm People Down' from a friend. Michael Staver explores the mindset & belief of Angry Person and the ways to deal constructively with such Angry people. His definition of Fear (Finding Evidence Against Reality) with an example of a brain adding head,nose,legs,eyes to a non-existant thing is excellent. He starts by conveying the losses due to anger such as Loss in Judgement, Inablity of self-control & Inability to Receive.

He correlates the stages of anger with the Bell Shape & conveys that it has its own characteristics just as the base(normal person), slope(gradually increasing anger - Escalation) , top(Peak of anger - Crisis) , slope(Decrease in anger after crisis - Resolution) and base(Back to normalcy). He conveys tricks to handle anger at every such stage so that the angry person reaches the falling-slope / base of bell without doing much damage.

He also busts many myths of anger like 'Verbal/Physical venting will have lasting calmning effects', 'Getting angry is the only way to get things done', 'It is only natural to respond that way - The excuse myth' , 'Strongly confronting an angry person will back them down' and many more.

The author conveys the need for listening, being quiet, empathy, venting, dis-engaging, warning-signs, timeout, apology, playing referee & many other interesting practical tricks that are very useful in office, dealerships, negotiations & relationships.

He also gives steps to deal with 'abusing anger' & for tackling 'dangerous threats'.

Certain instances are so True that prove Michael Staver's expertise in Anger. His ability to mix humour at certain scenarios while teaching the Anger Defusing tricks deserve credit.

The tricks & scenarios are very practical and is a Must Read for Everyone.

Saturday, August 15, 2009

The Read & Appply Pattern

I find that few people read lot of books , but even after that
their behaviour/attitude does not get distilled. Strange, but True !

The reason behind this is, they do not come out of
their comfort zone of ONLY READING . All they have to do is :-
- Read few ideas from the book. (Original Comfort Zone)
- Apply it for few days (Go out of the Comfort Zone)
- Go back to the book. Read few tricks (Comfort Zone)
- Apply it for few days (Go out of the Comfort Zone)
Continue the above pattern & the results are awesome.

If they Read and Do Not Apply it, it is better Not to Read it !

Thursday, August 13, 2009

InitBlog

I got Robin Sharma's 'Monk Who Sold His Ferrari' recently . It looks like a tiny book, but in reality it has a very vast content. Robin Sharma has built this book with his thoughts about Self leadership, Personal responsibility & Spiritual embodiment by having a Lawyer's visit to India(Himalayas) in the main track. He provides information exact to the point with simple & tiny examples.

Hats-Off to his style of narration using a Garden, Stopwatch, Sumo warrior, Pink wire and Diamond path . He makes the Mind as Garden and asks us to be the watchman for it. The role of watchman is to look out for negative thoughts & keep it out of mind. Just like the strong Pink wires , he asks us to have the will power in controlling the mind(garden). By doing this we will have mastery over mind and inturn mastery over life. Self mastery also requires the Time mastery & he uses the stopwatch to convey it.

Ideas like Half filled Cup, Energy Leaks, Blueprinting, Opposition Thinking, Mind Filter, Magic rule 21 & Push-ups deserve credit. He uses few Chinese and Sanskrit words to explain certain basic things that are existing from ancient days. His ability to go beyond languages to convey the info to his readers is interesting.

Robin Sharma conveys that,
People who study others are wise and People who study themselves are enlightened.

I would like to convey that,
People who read 'Monk Who Sold his Ferrari' will move one step near to their life's goal/achievement.

I recommend it for everyone.

Tiny Post

Till yesterday, i have been only thinking about blogging for years. Today, i decided to do it & I did it by this tiny post. yoowww !!

I have planned to spend only 30 minutes for any post. Tiny drops make a mighty ocean and this is the first drop towards it :-).