Accenture Situational Interview Questions 2012

Explain memory allocation process in C.

  • Memory allocation process indicates reserving some part of the memory space based on the requirement for the code execution.
  • There are two types of memory allocation done in C:
    1. Static memory allocation: The memory allocation during the beginning of the program is known as static memory allocation. In this type of memory allocation allocated memory size remains fixed and it is not allowed to change the memory size during run-time. It will make use of a stack for memory management.
    2. Dynamic memory allocation: The memory allocation during run-time is considered as dynamic memory allocation. We can mention the size at runtime as per requirement. It will make use of heap data structure for memory management. The required memory space can be allocated and deallocated from heap memory. It is mainly used in pointers. Four types of the pre-defined function that are used to dynamically allocate the memory are given below:
      • malloc()
      • calloc()
      • realloc()
      • free()
  • What is the “Diamond problem” in Java?

    The “Diamond problem” usually happens in multiple inheritances. Java does not support multiple inheritances, so in the case of Java, the diamond problem occurs when you are trying to implement multiple interfaces. When two interfaces having methods with the same signature are implemented to a single class, it creates ambiguity for the compiler about which function it has to call, so it produces an error at the compile time. Its structure looks similar to diamond thus it is called a “Diamond problem”.

    Here, if we try to access the print() function using the DerivedClass3 object, it will create confusion for the compiler that which copy of the print() function it has to call i.e., from DerivedClass1 or DervivedClass2.

    “Diamond problem” is solved by using virtual inheritance. It guarantees that the child class will get only one instance of the common base class.

    Is Accenture a great place to start a career?

    Below mentioned are some of the major reasons why Accenture is a great place to start your career:

  • The People: If you are working for Accenture, you can observe that everyone from lower-level to upper-level employees are approachable and there to help you. Accenture’s ‘One Global Network’ allows you to reach out to colleagues across the globe for any kind of support. There are plenty of opportunities to network and meet new people in Accenture, from events to getting involved in clubs and societies.
  • Fast-Paced Environment In Accenture, you can directly communicate with the clients and put across your best views at all times from day one of your project. Normally, at Accenture, you can experience working in a fast-paced environment. Working closely with clients and colleagues lets you develop and grow professionally in this kind of robust work environment.
  • Continuous Learning Working for Accenture definitely lets you continue to learn and grow as you are going to be exposed to new technologies and varied business strategies on a continuous basis. At times, working for Accenture can be challenging; but the skills that you acquire and develop are important to your professional development.
  • 1 What is meant by the Friend function in C++?

  • A friend() function is a function that has access to private and protected members of another class i.e., a class in which it is declared as a friend. It is possible to declare a function as a friend function with the help of the friend keyword.
  • Syntax:
  • ACCENTURE Interview Questions & Answers!

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *