Showing posts with label agilent faqs. Show all posts
Showing posts with label agilent faqs. Show all posts

Agilent technologies Interview questions

Agilent technologies Interview questions
1)What is abstract function?
2)What is the difference between copy by value and copy by reference?
3)What are various searching techniques? explain
4)what is binary search? what is it complexity?
5)What is good object oriented language?
6)what are different object oriented features?
7)Difference between object and class?
8)difference between c++ and c struct and class?Explain
9)What would you do if you were given a project and couldn't finish it on time?
10)Write program to count number of bits in a integer?

Agilent Interview questions

Agilent Interview questions
1]. What are the default member functions included in the class definition ?
2]. Does default destructor provided by the compiler?
3]. How to make a class to restrict its number of instances to 5?
4]. What is singleton class? Design it.
5]. What will happen?
main(){
A a1;
a1=a1;
/* Some other code */
}

6]. main(){
int x=5;
printf("%d%d%d",x,++x,x++);
}

7]. main(){
int x=5;
printf("%d%d%d",x,x<<1,x>>1);
}

8]. What are the various storage classes ?
A. Extern, Static, Auto, Register

9]. Is this right ? Why or Why not?
static extern int x;
Ans: No, It will give compilation error. "more than one storage class specified", Reason is obvious.

10]. What is the need of writing our own copy constructor when it is by default provided by the compiler?

11]. What is object slicing?

12]. What is stack unwinding?

13]. Can we use references as class member variables?
Ans: Yes, we can. But then it must be initialized in constructor base/member initializer list. e.g.
class A{
int x;
int &y;
public:
A():x(1),y(x){
cout<<"A x="<<<" y="<<
}
};