Premium Employer

Hexaware Technologies

3.5
based on 5.9k Reviews
Filter interviews by

20+ SA Infrastructure Consultants Interview Questions and Answers

Updated 21 Dec 2024
Popular Designations

Q1. Program to find second largest number from set of array

Ans.

Program to find second largest number from set of array

  • Sort the array in descending order

  • Return the second element of the sorted array

View 2 more answers

Q2. Write a program to check whether string is palindrome or not?

Ans.

Program to check if a string is a palindrome or not.

  • Create a function to compare the original string with its reverse.

  • Ignore spaces and punctuation when checking for palindrome.

  • Example: 'racecar' is a palindrome, 'hello' is not.

View 1 answer

Q3. Stack implementation, difference between stack and linked list , merge sort algorithm

Ans.

Question on stack implementation, difference between stack and linked list, and merge sort algorithm.

  • Stack is a LIFO data structure while linked list is a linear data structure.

  • Stack is implemented using arrays or linked lists while linked list is implemented using pointers.

  • Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts them separately, and then merges them.

  • Merge sort has a time complexity of O(nlogn) and is a stable sorting a...read more

Add your answer

Q4. What are OOPS concepts and explain

Ans.

OOPS concepts are the principles of Object-Oriented Programming that help in creating modular and reusable code.

  • OOPS stands for Object-Oriented Programming System

  • It includes concepts like Inheritance, Polymorphism, Encapsulation, and Abstraction

  • Inheritance allows a class to inherit properties and methods from another class

  • Polymorphism allows objects to take on multiple forms or behaviors

  • Encapsulation is the practice of hiding data and methods within a class

  • Abstraction is the ...read more

Add your answer
Discover SA Infrastructure Consultants interview dos and don'ts from real experiences

Q5. Explain Protected, private and public access modifier

Ans.

Protected, private and public are access modifiers in object-oriented programming that control the visibility of class members.

  • Public members are accessible from anywhere in the program.

  • Private members are only accessible within the class they are declared in.

  • Protected members are accessible within the class they are declared in and any subclasses.

  • Access modifiers are used to enforce encapsulation and prevent unauthorized access to class members.

Add your answer

Q6. Write a program to reverse a string eg. Hello World to olleh dlrow

Ans.

A program to reverse a string by iterating through the characters and appending them in reverse order.

  • Create a function that takes a string as input

  • Initialize an empty string to store the reversed string

  • Iterate through the characters of the input string in reverse order and append them to the empty string

  • Return the reversed string

Add your answer
Are these interview questions helpful?

Q7. Write a program to find second maximum number in an array.

Ans.

Program to find second maximum number in an array of strings.

  • Convert array elements to integers for comparison.

  • Sort the array in descending order.

  • Return the second element in the sorted array.

Add your answer

Q8. Brief discription of project, regression in machine learning.

Ans.

Regression in machine learning is a technique used to predict continuous numerical values based on input data.

  • Regression models are used to analyze the relationship between variables and predict outcomes.

  • Linear regression is a common type of regression used in machine learning.

  • Examples of regression in machine learning include predicting housing prices based on features like location and square footage, or predicting stock prices based on historical data.

  • Regression can also b...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is Object Oriented Programming?

Ans.

Object Oriented Programming is a programming paradigm based on the concept of objects, which can contain data and code.

  • OOP focuses on creating objects that interact with each other to solve problems

  • Objects have attributes (data) and methods (functions)

  • Encapsulation, inheritance, and polymorphism are key principles of OOP

  • Examples of OOP languages include Java, C++, and Python

Add your answer

Q10. Name 4 pillars of Object Oriented Programming

Ans.

Encapsulation, Inheritance, Polymorphism, Abstraction are the 4 pillars of OOP

  • Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Class in Java

  • Inheritance: Ability of a class to inherit properties and behavior from another class. Example: Subclass extending a superclass

  • Polymorphism: Ability to present the same interface for different data types. Example: Method overloading in Java

  • Abstraction: Hiding the complex implementation details...read more

View 1 answer

Q11. what is oop? what is os? joins in sql, insert query

Ans.

OOP is Object-Oriented Programming. OS is Operating System. SQL joins and insert queries are used to manipulate data in databases.

  • OOP is a programming paradigm that focuses on objects and their interactions.

  • OS is a software that manages computer hardware and software resources.

  • SQL joins are used to combine data from two or more tables based on a related column.

  • Insert queries are used to add new data to a table in a database.

Add your answer

Q12. What is the difference b/w complie time and run time polymorphism?

Ans.

Compile time polymorphism is resolved at compile time, while run time polymorphism is resolved at run time.

  • Compile time polymorphism is achieved through function overloading and operator overloading.

  • Run time polymorphism is achieved through function overriding and virtual functions.

  • Compile time polymorphism is faster as the resolution is done at compile time.

  • Run time polymorphism allows dynamic binding of functions based on the object type at run time.

  • Compile time polymorphis...read more

Add your answer

Q13. What is jagged array?

Ans.

A jagged array is an array of arrays where each element can be of different sizes.

  • Each sub-array can have a different number of elements

  • Useful for representing data structures like matrices or tables

  • Example: [['apple', 'banana'], ['orange', 'grape', 'kiwi']]

View 1 answer

Q14. What is Software Development Lifecycle ?

Ans.

Software Development Lifecycle is a process followed by software development teams to design, develop and maintain software.

  • It includes phases like planning, analysis, design, implementation, testing, deployment, and maintenance.

  • Each phase has its own set of activities and deliverables.

  • It helps in ensuring that the software is developed efficiently and meets the requirements of the stakeholders.

  • Examples of SDLC models are Waterfall, Agile, and DevOps.

Add your answer

Q15. What are constructors?

Ans.

Constructors are special methods in a class that are used to initialize objects.

  • Constructors have the same name as the class they belong to.

  • They are called automatically when an object is created.

  • Constructors can have parameters to initialize object properties.

  • They do not have a return type.

  • Example: public class Car { public Car(String color) { this.color = color; }}

Add your answer

Q16. Intro What is oops Encapsulation Polymorphism Runtime, compile time Dbms Sql vs no sql

Ans.

Questions related to programming concepts and database management systems.

  • OOPs stands for Object-Oriented Programming which is a programming paradigm based on the concept of objects.

  • Encapsulation is the process of hiding the implementation details of an object from the outside world.

  • Polymorphism is the ability of an object to take on many forms.

  • Runtime and compile time are two phases of program execution.

  • DBMS stands for Database Management System which is a software system us...read more

Add your answer

Q17. Difference between DELETE and TRUNCATE ?

Ans.

DELETE removes specific rows from a table while TRUNCATE removes all rows and resets the table.

  • DELETE is a DML command while TRUNCATE is a DDL command.

  • DELETE can be rolled back while TRUNCATE cannot be rolled back.

  • DELETE is slower than TRUNCATE as it logs each row deletion while TRUNCATE does not.

  • DELETE can have WHERE clause while TRUNCATE cannot have WHERE clause.

  • DELETE does not reset the identity of the table while TRUNCATE resets the identity of the table.

Add your answer

Q18. Explain prime number program

Ans.

A program that identifies prime numbers.

  • A prime number is a number that is only divisible by 1 and itself.

  • The program should take an input number and check if it is prime.

  • One way to check for prime numbers is to divide the number by all numbers less than it.

  • If the number is only divisible by 1 and itself, it is prime.

Add your answer

Q19. Diff b/w call by value and call by reference?

Ans.

Call by value passes a copy of the value, while call by reference passes the memory address of the value.

  • Call by value creates a new copy of the value being passed.

  • Call by reference passes the memory address of the value being passed.

  • Changes made to the parameter in call by value do not affect the original value.

  • Changes made to the parameter in call by reference affect the original value.

Add your answer

Q20. Explain program of Palindrome

Ans.

A program that checks if a given string is the same when read forwards and backwards.

  • A palindrome can be a word, phrase, number, or other sequence of characters.

  • The program should remove any spaces and punctuation before checking for palindrome.

  • Examples of palindromes include 'racecar', 'level', and 'A man, a plan, a canal, Panama!'

Add your answer

Q21. Difference between Union and Union ALL ?

Ans.

Union combines and removes duplicates from two or more tables, while Union ALL combines all rows from two or more tables.

  • Union removes duplicates, Union ALL does not

  • Union requires the same number of columns in each table, Union ALL does not

  • Union is slower than Union ALL

  • Example: SELECT column1 FROM table1 UNION SELECT column1 FROM table2

  • Example: SELECT column1 FROM table1 UNION ALL SELECT column1 FROM table2

Add your answer

Q22. Brief about arrays and a small program on array.

Ans.

Arrays are a collection of similar data types. They are used to store and access multiple values using a single variable.

  • Arrays can be of different types such as integer, float, character, etc.

  • Arrays are declared with a fixed size and can be accessed using index numbers.

  • Example: int arr[5] = {1, 2, 3, 4, 5};

  • Arrays can also be of strings, which are essentially arrays of characters.

  • Example: char str[10] = 'Hello';

Add your answer

Q23. Explain the OOP Concepts? Use of OOP?

Ans.

OOP stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.

  • OOP focuses on creating objects that contain both data and methods to manipulate that data.

  • Encapsulation: Objects hide their internal state and require interaction through defined interfaces.

  • Inheritance: Objects can inherit attributes and methods from parent classes.

  • Polymorphism: Objects can take on multiple forms and behave differently based on their data type.

  • Example: In...read more

Add your answer

Q24. Write Bubble sort Program ?

Ans.

Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.

  • Compare adjacent elements and swap them if they are in the wrong order

  • Repeat this process until the list is sorted

  • Time complexity is O(n^2)

  • Example: [5, 3, 8, 4, 2] -> [3, 5, 8, 4, 2] -> [3, 5, 4, 8, 2] -> [3, 5, 4, 2, 8] -> [3, 4, 5, 2, 8] -> [3, 4, 2, 5, 8] -> [3, 4, 2, 5, 8] -> [3, 2, 4, 5, 8] -> [2, 3, 4, 5, 8]

Add your answer

Q25. 1.Different between c and c++

Ans.

C++ is an extension of C with added features like object-oriented programming, templates, and exception handling.

  • C++ supports object-oriented programming while C does not.

  • C++ has a richer set of data types and operators than C.

  • C++ supports function overloading and templates while C does not.

  • C++ has exception handling while C does not.

  • C++ is backward compatible with C.

  • Example: C++ allows defining classes and objects while C does not.

  • Example: C++ supports function overloading, ...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at SA Infrastructure Consultants

based on 25 interviews
5 Interview rounds
Resume Shortlist Round
Aptitude Test Round
Technical Round
HR Round - 1
HR Round - 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Graduate Engineer Trainee (Get) Interview Questions from Similar Companies

3.5
 • 46 Interview Questions
3.5
 • 13 Interview Questions
3.7
 • 12 Interview Questions
4.1
 • 12 Interview Questions
4.6
 • 11 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

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