Вы находитесь на странице: 1из 9

HCL

1.What is copy constructor and give syntax? What will happen if we remove the ‘&’symbol
and use const key word.

2.what is void pointer & Dangling pointer?

3.what is function pointer?

4.what is diamond problem?

5.What are the types of type casting?

6.Wh at is the difference between map and multimap?

7.How to display elements in single linked list?(Data structures)

8.What is vector ?what is the difference between vector and arrays?(DS)

9.Circular linked list?(DS)

10. sample s1,s2;

S1=s2;

S2=s1;

How copy constructor will inwork?

11.If we use ‘new’ key word is the constructor invoke or not?

12.What is the difference between malloc and new?

13.What are design patterns ?which desig pattern is used in your project?

------------------------ -------------------------- -------------

First round

1. Tell me about the products where you have used C++


2. What are the OOPS concepts? explain each
3. What is the use of encapsulation
4. What is the difference between references and pointers with syntax
5. What is void pointer
6. Program to swap two variables without using third variable
7. Use of virtual keyword and write a program
8. Use of extern keyword? If I declare extern int i=10 in test.cpp and I declare extern
int i=5; in test1.cpp, will it generate error?
9. If default copy constructor is there, how to define explicitly
10. How compiler can access the virtual functions?
11. Design patterns? Singleton design pattern?
12. Can reference be NULL?
13. Do you threading?
14. Composition and aggregation
15. How memory is managed while writing code for mp/mc as they have small amount
of memory on-chip?
16. What are the C++11 concepts you have known so far?
17. Suppose I am inserting string stream of elements at run time (dynamic memory
allocation) then I want the output as N number of elements in sorted list. How this
can be achieved?

Second Round

1. In a file you have different sentences I want the


Output as a file with sorted list of sentences

2. Implement a class as

Cmystring str = ”test”;


str1 = ”test1”;
str != NULL;
str2=str1;

------------------------- ---------------------- ---------------

NCR

1.What is virtual function?


2.What is friend function & friend class?

3.Can you say few commands used in windows?

2nd Round

1.What is virtual function?

2.What is static function?

3.difference between global and static variables?

4.If a project is explained to you how will you find that “At this position I should use static
function?

5.Difference between macros and inline function?

Write a swap program without using temp variable ?

6.class A

{ virtual fun1();

fun2();

};

class B:public A

};

class C:public B

{virtual fun1();

};

i. int main()

A *p=new B;

p->fun1();

}
ii.int main( )

A *p=new C;

p->fun1();

p->fun2();

Give the correct answer for both & explain neatly ?

C++ miscellaneous interview question (FAQ)

)what is the difference between c and c++?

2)what are OOPS Concepts? Explain with an example?

3)what is the difference between Procedure oriented and Object Oriented Programming?

4)what is Reference Variable? Explain with an example?

5)what is the difference between Reference and Pointers?

6)what is the Syntax for a NEW operator? with an example?

7)what is the difference between Malloc, Calloc and New Operator?

8)what is Namespace? Explain with an example?

9)what is a Constructor? how many types of Constructors? with an example?

10)what is a Destructor?

11)Can we Place Virtual for Constructor and Destructor?

12)what is an Inheritance? how many types of inheritance? explain with example?

13)what is "Dimond shape Problem"? with an example?

14)what is Polymorphism? how many types of Polymorphism?


15)what is RunTime Polymorphism and compile time Polymorphism? explain with
example?

16)what is Deep Copy and Shallow Copy? with an example?

17)what is a Virtual Function? with an example?

18)what is a VTables and VPtr? explain with a diagram?

19)what is a Template? How many types of Templates?

20)How will you restrict the template for a Specific Datatype?

21)what is Friend Class and Function ?with an example?

22)what is a Smart Pointer in c++?

23)what is Abstract Class?

24)what is an Interface in c++?

25)what is Pure Virtual Function?

Quest global (bangalore)

1)what is VPTR and VTABLES?

2)how to initialize array of 5 int using pointers in construction?

3)write a swap function using reference?

4)syntax of copy construction?

5)why we write const in copy construction .what happen if not write?

6)what is inheritance? explain using different access specifiers?

7)what is virtual constructor?


8)why it is not possible?

9)how delete works?

L&T

1)explain I2C frame?

2)how master send data if many slaves connected?

3)what is opps concept?

4)explain encapsulation ,abstaction with an example?

5)In a class how you expalin where is abstraction?

6)what is static object?

7)if a class define static .how its works and where store in memory?

8)command use to check PID?

9)what is INIT pocess and it's PID?

TCS bangalore(technical)

1)introduce your self?

2)discuss current project?

3)which language you worked?

4)which linux and os version you worked?

5)expalin types of signals in connect system call what is 5 th aurgument?

6)In socket program explain client and server connection?

7)explain TCP/IP how it work?

8)why you use arm processor?

9)which architecture arm work?

10)xpalin PI board?

11)what is inheritance in Qt where u use it?


12)what is image difference between signal and image processing?

13)explain is convolution?

14)expalin frequency and time domain?

15)write a program to arrange an array in ascending order?

16)what is raw image?

17)what is the use I2c Protocol?

18)when we see grey image?

19)explain oops concepts?

BEL(bharath electronics)

(written exam)

1)prog to acess class members using pointers?

2)print only repeated number from 1 to 100?

3)print middle of linkedlist?

4)reverse a string?

5)factorial program?

6)difference between static() and function ()?

technical interview

1)explain program written in written exam?

2)how reverse in linkedlist?

3)difference between signal and slot?

4)what is disconnect in Qt?

5)how many signals in qt?

6)difference between slot and function?

7)how TCP use the conncetion?


8)what is port and IP address?

9)IDE used for Qt version?

10)expalin runtime polymorphism?

Trident information pvt ltd

1)what are OOPs concepts?

2)what is difference between encapsulation and abstraction?

3)what is virtual constructor ?

4)what is virtual destructor?

5)how to create a list like a add a node i)at forst 2)at middle 3)at last ?

6)what is Private inheritance?

C++ tasks :

1)How to skip some of the elements in Array using c++?

2)find the last index of a character element of a string using c++?

3)C++ program to find factorial of large numbers using array?

4)C++ program to convert number to word (up to four digits only)

5)C++ program to check given date is in valid format or not

6)C++ program to get week day from given date?

7)An array is instantiated with the new[] operator. Is it sufficient to delete the array using a
delete operator or should a delete[] operator be used? Justify your answer.

8)Can I drop the [] when deleting an array of some built-in type (char, int, etc)?

9)What is an example of when a destructor is NOT called at the end of scope?


10)Explain stack unwinding.

11)When I write a derived class's destructor, do I need to explicitly call the destructor for
my base class?

12)Explain the difference between a class and an object.

13)Explain the difference between a struct and a class.

14)What is difference between malloc/free and new/delete?

15)What language feature is available when a function returns a reference?

16)What is name mangling in C++?

17)What is overriding?

18)Can you assign to a reference?

19)What happens if you assign to a reference?

20)What is a static_ cast and when should it be used?

21)What are the names of the other cast operators?

22)How do you trap an exception without knowing what exception might be thrown?

23)Most programming projects involve modifying existing code. What things do you look
for when you're tasked with modifying an existing program?

24)There is a memory leak in a program. What tools and techniques would you use to
isolate, find and fix the memory leak?

25)What's the difference between a linked list and an array?

26)What is the difference between a vector, a list and a map?

27)What is a namespace?

28)What is an anonymous namespace and how is it different than a regular namespace?

29)The Three Jugs Problem


Two friends who have an eight-quart jug of water wish to share it evenly. They also have
two empty jars, one holding five quarts, the other three. How can they each measure
exactly 4 quarts of water?

Вам также может понравиться