LG Soft Interview Questions 

C

1)Difference between Union and Structure?

2)What is a Pointer?

3)What is Memory Leak?

4)What is Dangling Pointer? Explain with Example?

5)Write a Program to convert octal to binary?

6)Write a Program to print the given number in words?
  
   Ex : Input :1234
           Output: One Thousand Two Hundred Thirty-Four.

7)Write a Program to find the given two arrays are equal (or) not?

 Ex:Input: a1[]={1,2,1,3,1} a2[]-{2,1,3,1,1}
       Output: Both arrays are equal.


8)Write a Program to print 1 to 100, while printing if the number is divisible by 3
     print "Foo", If the number is divisible by 5 print "Bob".If the number is divisible by
     3 & 5 print "FooBob" ?

9)Write a Program to merge two strings?

10)Write a program to check the given number is Perfect Number is (or) not?

11)Explain Dynamic Memory allocation?

12)What is Void Pointer?

13)What is a Double Pointer?

14)Difference between malloc() and calloc() ?

15)Write a Program to print string in reverse order using recursion?

16)Write a Program to count all the letters in your name?

17)How calloc() allocate memory?

18)Explain Structure Padding, how it prevents?

19)Explain in detail PreProcessor Directives?


C++

1)Difference between class and object?

2)What are the Dis Advantages of Diamond Inheritance?

3)What is the Use of Static variables in class?

4)What is Hash Map in C++?

5)Difference between private and protected in c++ class?

6)What is meant by Inheritance and Types of Inheritance?

7)What is Pure Virtual Class?

8)What is Abstract Class?

9)What is OOPS Concept and Explain in detail with a real-time example?

10)Explain the types of Inheritances in CPP?

11)Difference between Multipath and Hierarchical Inheritances?

12)What is Virtual Function? Explain in detail?

13)What are Virtual Table and Virtual Pointer?

14)Difference between Protected and Private?

15)Explain the features of CPP?

16)What is Binding? Types of Binding?

17)What is Function Overloading? Explain With Example?

18)What is Operator Overloading?

19)What is Function Overriding? Is it Compile Time  (or) Run Time?

20)Explain Diamond Inheritance in detail?

21)What is Template and Its Advantages?

22)What is Polymorphism?


Data Structures 

1)What is Hashing?

2)What is Queue and its real-time example?

3)What is Function Pointer? Explain With Example?