Friday, December 31, 2010

Are u Strong In CPP? check..


1.   Company:    Tata Infotech 
1.Which of the following represents true statement either x is in the range of 10 and 50 or y is zero?
  (a) x >= 10 && x <= 50 || y = = 0
  (b) x<50
  (c) y!=10 && x>=50
  (d) x >= 10 && (x <= 50 || y = = 0)
2.What is the value of y in the following code?

x=7;
y=0;
if(x=6)
y=7;
else
y=1;
  (a) 7
  (b) 0
  (c) 1
  (d) 6
3.  Company:    DE Shaw
3.What is the value of y in the following code?

x=7;
y=0;
if(x=6)
y=7;
else
y=1;
  (a) 7
  (b) 0
  (c) 1
  (d) 6
4.  Company:    HCL

The type of the controlling expression of a switch statement cannot be of the type
  a) int
  b) char
  c) short
  d) float
5.  Company:    Oracle

What is the output of the program?

int main()
{
char s[]="oracle is the best";
char t[40];
char *ss,*tt;
ss = s;
tt = t;
while(*tt++=*ss++);
printf("%s",t);
}
   A. oracle is the best
   B. Garbage
  c. Error Message
  D. Goes into infinite loop
6.  Company:    Cisco

int i,j=1;
for(i=0;i<10;i++)
{
j=j+1;
}
printf("%d %d",i,j);
  a) 9 11
  b) 10 11
  c) 9 10
  d) Compile Error
7.  Company:    HCL

What can be said of the following program?

main()
{
enum Months {JAN =1,FEB,MAR,APR};
enum Months X = JAN;
if(X==1)
{
printf("Jan is the first month");
}
}
  a) Does not print anything
  b) Prints : Jan is the first month
  c) Generates compilation error
  d) Results in runtime error
8.  Company:    HCL

What is the size of variable of following union.Assume that the size of int =2, size of float =4 and size of char =1.

Union Tag{int a;float b;char c;};
  a) 2
  b) 4
  c) 1
  d) 7
9.  Company:     DE Shaw

int fun( int n)
{
int i;
for(i=0;i<=n;i++)
fun(n-i);
printf(" well done");
}
How many times is the printf statement executed for n=10?
  a) 0
  b) 9
  c) 10
  d) 11
10.  Company:    Satyam

#include
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
  a) Systems
  b) Ramco
  c) RamcoSystems
  d) Rsystems
11.  Company:    Accenture

main(int argc, char *argv[])
{
(main(argc, argv) && argc) ? main(argc-1, NULL) : return 0;
}
  a) Runtime error.
  b) Compile error. Illegal syntax
  c) Gets into Infinite loop
  d) None of the above
12.  Company:    Oracle

int func(int z)
{
if (z== 6)
return 5;
else
return 6;
}
int main ( )
{
int x,y;
y=5;
x=func(y++);
printf("%s\n",(x==5)?"true":"false");
}
  a) True
  b) false
  c) either a or b
  d) neither a nor b
13.  Company:    DE Shaw

if ptr is defined as int *p;
which of the following correctly allocates 100 units memory for ptr?
  a) ptr = (int *)(malloc(sizeof(int));
  b) ptr = (int *)(malloc(100));
  c) ptr = (int *)(malloc(100*sizeof(int));
  d) None
14.  Company:    HCL

What is the output of the following program?

swap(int x,int y)
{
int temp;
temp =x;
x=y;
y=temp;
}
main()
{
int x=20;
int y=10;
swap(x,y);
printf("%d %d",y,x+2);
}
  a) 10 20
  b) 20 12
  c) 22 10
  d) 10 22


>Note ur Answer to questions.
  then send your answers to me,i will send u answers with explanation.  
mail: rajesh.mca134@gmail.com     
OR
see the blog after a week for answers                                          
                                                                                                                         Rajesh.A
                                                                                                                         president.
                                                                                                                         gateact.

 

Monday, December 27, 2010

my experiences in CTS

Hai frnds i got selected in CTS. My written completed inSJBIT in Bangalore.Written consists of 55 question and time duration is 50 mins, 25 verbal (20 min) , 30 analytical (30 min). It seems to be sectional cutoff (13 ,14) if u get above 27 u will be called for next round, but don't think 27 is enough it may be higher try to score above 40 (because easy). You should be very much conscious about your time ,do quickly in mind without using paper or pens.
ANALYTICAL ABILITY: There are problems based on based on figures ( R.S Agarwal verbal reasoning is enough )What next in the figure series ,odd out etc.... coding-decoding like berry -cfssz then query- _____? These are very easy, try to solve very quickly. You should get full score in these topics so that it will be easy to clear, The analytical section about 13 questions came from these topics.3 Question based on cartesian coordinates (graphical problems). 5 questions based on eligibility test (RS.Agarwal) Tabulations Type3 Syllogisms
VERBAL ABILITY (20mins)(5 -questions)first try correct and incorrect sentences mistakes mostly related to present ,past,future tenses articles and prepositions.. (5-questions)Jumbled sentences (understand present, past, or future tenses so that u can predict find out more easily what happen before & after)10 questions from paragraph.For paragraph read the questions first.concentration is important to understand.Practice more on all the above topics to keep up the time
TECHNICAL INTERVIEW: Interview will be based on our acadamic subjects,project. some questions werer diff btw primary key and foreign key? He asked more cross questions on that.my motto is to satisfy him. Finally my interviewer satisfied by my answer.And he asked normalization,joins, programs in c, diff btw linkedlist and queues and some cross questions on it.Then about my project.So please guys prepare well on your acadamic sujects well and thourough about ur project.
I waited about an 20 mins to know my result, I cleared the my technical round and called for HR. HR is just a formality. Though its just a formality keep in mind that they haven't selected you still.conscious about your words more here. Be confident, Not over confident. Some questions asked me were1. tell me about urself?2. about my goal3.will u able to work any where? and cross questions on it4. tell me about ur project?5.about company? 6.why i hire u? like this.........

All the best. Thank you ,

Monday, December 20, 2010

Qualitys That need to Learn


READ THE WHOLE OF IT !!
TRUST
Trust is a very important factor for all relationships. When trust is broken, it is the end of the relationship. Lack of trust leads to suspicion, suspicion generates anger, anger causes enmity and enmity may result in separation.

A telephone operator told me that one day she received a phone call.
  She answered, "Public Utilities Board." There was silence.
She repeated, "PUB." There was still no answer. 
When she was going to cut off the line, she heard a lady's voice, "Oh, so this is PUB.
Sorry, I got the number from my Husband's pocket but I do not know whose number it is."

Without mutual trust, just imagine what will happen to the couple if the telephone operator answered with just "hello" instead of "PUB".
------------ --------- --------- --------- --------- --------- --------- --------- -

NO POINTING FINGERS
A man asked his father-in-law, "Many people praised you for a successful marriage. Could you please share with me your secret?"
The father-in-law answered in a smile, "Never criticize your wife for her shortcomings or when she does something wrong. Always bear in mind that because of her shortcomings and weaknesses, she could not find a better husband than you."

We all look forward to being loved and respected. Many people are afraid of losing face. Generally, when a person makes a mistake, he would look around to find a scapegoat to point the finger at. This is the start of a war. We should always remember that when we point one finger at a person, the other four fingers are pointing at ourselves.

If we forgive the others, others will ignore our mistake too.
------------ --------- --------- --------- --------- --------- --------- --------- -

CREATING PERFECT RELATIONSHIPS?
A person visited the government matchmaker for marriage, SDU, and requested "I am looking for a spouse. Please help me to find a suitable one." The SDU officer said, "Your requirements, please." "Oh, good looking, polite, humorous, sporty, knowledgeable, good in singing and dancing. Willing to accompany me the whole day at home during my leisure hour, if I don't go out. Telling me interesting stories when I need companion for conversation and be silent when I want to rest." The officer listened carefully and replied, "I understand you need television.."

There is a saying that a perfect match can only be found between a blind wife and a deaf husband, because the blind wife cannot see the faults of the husband and the deaf husband cannot hear the nagging of the wife. Many couples are blind and deaf at the courting stage and dream of perpetual perfect relationship. Unfortunately, when the excitement of love wears off, they wake up a and discover that marriage is not a bed of roses. The nightmare begins.
----------- --------- --------- --------- --------- --------- --------- --------- -

NO OVERPOWERING 

Many relationships fail because one party tries to overpower another, or demands too much. People in love tend to think that love will conquer all and their spouses will change the bad habits after marriage. Actually, this is not the case. There is a Chinese saying which carries the meaning that "It is easier to reshape a mountain or a river than a person's character."

It is not easy to change. Thus, having high expectation on changing the spouse character will cause disappointment and unpleasantness.

It would be less painful to change ourselves and lower our expectations. .
------------ --------- --------- --------- --------- --------- --------- --------- -

RIGHT SPEECH

There is a Chinese saying which carries the meaning that "A speech will either prosper or ruin a nation." Many relationships break off because of wrong speech. When a couple is too close with each other, we always forget mutual respect and courtesy. We may say anything without considering if it would hurt the other party.

A friend and her millionaire husband visited their construction site. A worker who wore a helmet saw her and shouted, "Hi, Emily! Remember me? We used to date in the secondary school." On the way home, her millionaire husband teased her, "Luckily you married me. Otherwise you will be the wife of a construction worker." She answered," You should appreciate that you married me. Otherwise, he will be the millionaire and not you."

Frequently exchanging these remarks plants the seed for a bad relationship. It's like a broken egg - cannot be reversed.
------------ --------- --------- --------- --------- --------- --------- --------- -

PERSONAL PERCEPTION

Different people have different perception. One man's meat could be another man's poison.
A couple bought a donkey from the market. On the way home, a boy commented, "Very stupid. Why neither of them rides on the donkey? "Upon hearing that, the husband let the wife ride on the donkey. He walked besides them. Later, an old man saw it and commented, "The husband is the head of family. How can the wife ride on the donkey while the husband is on foot?" Hearing this, the wife quickly got down and let the husband ride on the donkey.

Further on the way home, they met an old Lady. She commented, "How can the man ride on the donkey but let the wife walk. He is no gentleman."
The husband thus quickly asked the wife to join him on the donkey. Then, they met a young man. He commented, "Poor donkey, how can you hold up the weight of two persons. They are cruel to you." Hearing that, the husband and wife immediately climbed down from the donkey and carried it on their shoulders.

It seems to be the only choice left. Later, on a narrow bridge, the donkey was frightened and struggled. They lost their balance and fell into the river. You can never have everyone praise you, nor will everyone condemn you.. Never in the past, not at present, and never will be in the future.

Thus, do not be too bothered by others words if our conscience is clear..
------------ --------- --------- --------- --------- --------- --------- --------- -

BE PATIENT

This is a true story which happened in the States. A man came out of his home to admire his new truck. To his puzzlement, his three-year-old son was happily hammering dents into the shiny paint of the truck. The man ran to his son, knocked him away, hammered the little boy's hands into pulp as punishment. When the father calmed down, he rushed his son to the hospital.

Although the doctor tried desperately to save the crushed bones, he finally had to amputate the fingers of both the hands of the kid. When the boy woke up from the surgery & saw his bandaged stubs, he innocently said, "Daddy, I'm sorry about your truck." Then he asked, "but when are my fingers going to grow back?" The father went home & committed suicide.

Think about this story the next time someone steps on your feet or u wish to take revenge. Think first before u lose your patience with someone u love. Trucks can be repaired.. Broken bones & hurt feelings often can't. Too often we fail to recognize the difference between the person and the performance. We forget that forgiveness is greater than revenge.

People make mistakes. We are allowed to make mistakes. But the actions we take while in a rage will haunt us forever.

 
   Thanks 
          to
             Ms.Sandhya Ganeshan, 
                                  BCA(Iyear).

                                                                                                                                                                 By
                                                                                                                                                            Rajesh.A
                                                                                                                                                           President,
                                                                                                                                                          GATEACT.