Add office photos
Employer?
Claim Account for FREE

Tcg Digital Solutions

3.4
based on 97 Reviews
Filter interviews by

Alamo XS Real Interview Questions and Answers

Updated 5 Feb 2024

Q1. How does map and unordered map are implemented in C++ STL library.

Ans.

Map and unordered map are implemented as associative containers in C++ STL library.

  • Map is implemented as a balanced binary search tree while unordered map is implemented as a hash table.

  • Map stores elements in a sorted order while unordered map does not guarantee any specific order.

  • Map has a logarithmic time complexity for insertion, deletion, and search operations while unordered map has an average constant time complexity for these operations.

  • Map allows only unique keys whil...read more

Add your answer

Q2. How to debug a C++ program containg a segmentation fault using GDB, how to add break points at suspected function, how to take core dumps of a binary.

Ans.

Debugging C++ program with segmentation fault using GDB

  • Compile the program with -g flag to include debugging symbols

  • Run the program with GDB and set breakpoints at suspected functions

  • Use 'run' command to execute the program within GDB

  • Use 'backtrace' command to see the call stack when the segmentation fault occurs

  • Use 'print' command to inspect variables and memory addresses

  • Use 'core dump' command to generate a core dump file for post-mortem analysis

Add your answer

Q3. How to grep a value from a file containing key = value format enteries in each line when key is given using bash or shell scripting.

Ans.

To grep a value from a file with key=value format, use awk command with delimiter as '=' and search for the key.

  • Use awk command with delimiter as '=' to split the line into key and value

  • Search for the key in the key column and print the corresponding value column

  • Example: awk -F'=' '/key/ {print $2}' file.txt

Add your answer

Q4. How to store a key value pairs in C++ data structures where key is same for some of the entries ?

Ans.

Use C++ map or unordered_map to store key value pairs with same key

  • C++ map and unordered_map are associative containers that store elements in key value pairs

  • If the key is same for some entries, map will store only one entry while unordered_map can store multiple entries

  • Example: map myMap; myMap["key1"] = 1; myMap["key2"] = 2; myMap["key1"] = 3; // myMap["key1"] will be 3

  • Example: unordered_map myUnorderedMap; myUnorderedMap["key1"] = 1; myUnorderedMap["key2"] = 2; myUnordered...read more

Add your answer
Discover Alamo XS Real interview dos and don'ts from real experiences

Q5. What are virtual functions, Vtables, and method overriding in C++

Ans.

Virtual functions are functions that can be overridden in derived classes. Vtables are tables of function pointers used for dynamic dispatch.

  • Virtual functions allow for polymorphism and dynamic binding

  • Vtables are used to implement virtual functions

  • Method overriding is when a derived class provides its own implementation of a virtual function

  • Virtual functions are declared using the virtual keyword

  • Example: class Animal { virtual void makeSound() { cout << 'Animal sound'; } }; c...read more

Add your answer

Q6. Explain directives , dependency injection, promise and observables,way features, routing, interceptor, communication between components

Ans.

Explanation of directives, dependency injection, promise and observables, routing, interceptor, and communication between components.

  • Directives are markers on a DOM element that tell AngularJS to attach a specified behavior to that element.

  • Dependency Injection is a design pattern that allows a class to be injected with its dependencies rather than creating them itself.

  • Promises are objects that represent the eventual completion or failure of an asynchronous operation and its r...read more

Add your answer

Q7. How to create a singleton class ?

Ans.

A singleton class is a class that can only have one instance created throughout the lifetime of an application.

  • Create a private constructor to prevent external instantiation.

  • Create a private static instance of the class.

  • Create a public static method to access the instance.

  • Ensure thread safety by using synchronized keyword or static initializer.

  • Example: public class Singleton { private static Singleton instance = null; private Singleton() {} public static synchronized Singleto...read more

Add your answer

Q8. What is singleton class?

Ans.

A singleton class is a class that can only have one instance created at a time.

  • Singleton classes are often used in situations where only one instance of a class is needed, such as for managing a database connection or a configuration file.

  • The singleton pattern is implemented by making the constructor of the class private and providing a static method that returns the single instance of the class.

  • Singleton classes can be thread-safe by using synchronization or lazy initializat...read more

Add your answer

Q9. Explain Angular hooks

Ans.

Angular hooks are functions that allow developers to tap into the lifecycle of a component or directive.

  • Angular hooks are used to perform actions at specific points in the lifecycle of a component or directive

  • There are several types of hooks, including ngOnInit, ngOnChanges, and ngOnDestroy

  • ngOnInit is called once when the component is initialized

  • ngOnChanges is called whenever a data-bound input property changes

  • ngOnDestroy is called just before the component is destroyed

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.3
 • 54 Interview Questions
3.9
 • 24 Interview Questions
4.1
 • 16 Interview Questions
3.7
 • 12 Interview Questions
3.1
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter