Add office photos
Employer?
Claim Account for FREE

Wittybrains Software Technologies

4.0
based on 31 Reviews
Filter interviews by

Foliage Technologies Interview Questions and Answers

Updated 25 Jun 2024
Popular Designations

Q1. Write a program to count vowels and consonants in string

Ans.

A program to count the number of vowels and consonants in a given string.

  • Iterate through each character in the string

  • Check if the character is a vowel or consonant

  • Increment the respective count

  • Return the counts of vowels and consonants

View 2 more answers

Q2. What is the difference between truncate and drop command

Ans.

Truncate removes all data from a table while drop deletes the table itself.

  • Truncate is faster than drop as it only removes data and not the table structure

  • Truncate cannot be rolled back while drop can be

  • Truncate resets the identity of the table while drop does not

  • Truncate can only be used on tables while drop can be used on tables, views, and indexes

Add your answer

Q3. Write a program to delete middle node from the linked list

Ans.

Program to delete middle node from linked list

  • Traverse the list to find the middle node

  • Delete the middle node by updating pointers

  • Handle edge cases like even number of nodes

Add your answer

Q4. Write a program to reverse a string

Ans.

Program to reverse a string

  • Use a loop to iterate through the string and append each character to a new string in reverse order

  • Alternatively, use built-in string functions like reverse() or slice()

View 1 answer
Discover Foliage Technologies interview dos and don'ts from real experiences

Q5. Write a program to find the duplicate number in an array ranging 1 to 100, the input array contains exactly 100 items.

Ans.

Program to find duplicate number in array of 1 to 100 items.

  • Iterate through array and use a set to keep track of seen numbers.

  • If a number is already in set, it is a duplicate.

  • Return the duplicate number found.

Add your answer

Q6. What is static keyword

Ans.

Static keyword is used to define a class-level variable or method that can be accessed without creating an instance of the class.

  • Static variables are shared among all instances of a class

  • Static methods can be called without creating an object of the class

  • Static keyword can also be used to define a static block of code that gets executed only once when the class is loaded

  • Example: public static int count = 0; or public static void printMessage() {}

Add your answer

Q7. On which technology do you wish to work?

Ans.

I wish to work on developing applications using artificial intelligence and machine learning technologies.

  • Passionate about developing intelligent systems that can learn and adapt

  • Interested in working on projects involving natural language processing, computer vision, and predictive analytics

  • Experience with tools and frameworks like TensorFlow, PyTorch, and scikit-learn

Add your answer

Q8. Explain oops concept (polymorphism)

Ans.

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

  • Polymorphism allows objects of different classes to be treated as if they are of the same class.

  • It can be achieved through method overloading or method overriding.

  • Example: A shape class can have different subclasses like circle, square, and triangle. Each subclass can have its own implementation of the draw method.

  • Polymorphism makes code more flexible and reusable.

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 Engineer Interview Questions from Similar Companies

3.6
 • 30 Interview Questions
3.8
 • 14 Interview Questions
3.1
 • 10 Interview Questions
3.3
 • 10 Interview Questions
3.3
 • 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