Trainee Programmer

Trainee Programmer Interview Questions and Answers for Freshers

Updated 25 Apr 2024

Q1. what is polymorphism in Object-Oriented Programming?

Ans.

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

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • It enables methods to be defined in the superclass and overridden in the subclasses.

  • Polymorphism helps in achieving code reusability and flexibility in object-oriented programming.

  • Example: A superclass 'Animal' with subclasses 'Dog' and 'Cat'. Both 'Dog' and 'Cat' can be treated as 'Animal'.

Q2. Rate yourself in 5 different programming languages on a 1-10 scale, 10 being the best.

Ans.

I rate myself differently in different languages based on my experience and proficiency.

  • Java - 8: I have worked on multiple projects using Java and have a good understanding of its concepts.

  • Python - 7: I have used Python for scripting and automation tasks and have a decent understanding of its libraries.

  • C++ - 6: I have basic knowledge of C++ and have implemented some algorithms using it.

  • JavaScript - 8: I have worked on web development projects using JavaScript and its framewo...read more

Q3. Write a program using any language of your choice (It was a palindrome-based program.)

Ans.

A program to check if a given string is a palindrome or not.

  • Take input string from user

  • Reverse the string

  • Compare the reversed string with the original string

  • If both are same, then the string is a palindrome

  • Else, the string is not a palindrome

Q4. What is API?

Ans.

API stands for Application Programming Interface. It is a set of protocols, routines, and tools for building software applications.

  • API allows different software applications to communicate with each other

  • It defines how software components should interact

  • APIs can be public or private

  • Examples of APIs include Google Maps API, Twitter API, and Facebook API

Are these interview questions helpful?

Q5. What is encapsulation?

Ans.

Encapsulation is the process of hiding implementation details and restricting access to an object's properties and methods.

  • Encapsulation helps in achieving data abstraction and information hiding.

  • It prevents unauthorized access to an object's internal state.

  • It allows for better control over the object's behavior.

  • Example: A bank account class with private variables for balance and account number.

  • Example: A car class with private variables for speed and engine temperature.

Frequently asked in, ,

Q6. What is pointer What is inheritance?

Ans.

A pointer is a variable that stores the memory address of another variable. Inheritance is a mechanism in object-oriented programming where a new class inherits properties and behaviors from an existing class.

  • Pointer is used to store memory address of a variable

  • Pointer can be dereferenced to access the value stored at that memory address

  • Example: int *ptr; ptr = # *ptr = 10; // num now has value 10

  • Inheritance allows a new class to inherit properties and behaviors from an exist...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Any programming language Data types

Ans.

Programming languages have various data types such as integers, floats, strings, and booleans.

  • Data types define the type of data that can be stored in a variable.

  • Common data types include integers, floats, strings, and booleans.

  • Some programming languages also have more complex data types like arrays, structures, and classes.

  • Data types can affect the performance and memory usage of a program.

  • Examples of data types in different programming languages: int in C++, float in Python...read more

Q8. Create table syntax in DBMS

Ans.

Creating a table in a DBMS

  • Use CREATE TABLE statement

  • Specify table name and column names with data types

  • Add constraints like primary key, foreign key, etc.

  • Example: CREATE TABLE employees (id INT PRIMARY KEY, name VARCHAR(50), age INT)

  • Execute the statement to create the table

Trainee Programmer Jobs

Trainee Programmer Web 0-1 years
Wildgrube Software Private Limited
4.5
Hyderabad / Secunderabad
Trainee Programmer Delphi 0-2 years
Wildgrube Software Private Limited
4.5
Hyderabad / Secunderabad

Q9. Java is fully oops concept?

Ans.

Java is a fully object-oriented programming language.

  • Java supports all four pillars of OOP: encapsulation, inheritance, polymorphism, and abstraction.

  • Classes and objects are fundamental concepts in Java.

  • Java allows for the creation of user-defined classes and objects.

  • Inheritance enables code reusability in Java.

  • Polymorphism allows objects to be treated as instances of their parent class.

  • Abstraction allows for hiding implementation details and showing only necessary features t...read more

Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.8
 • 5.6k Interviews
3.0
 • 22 Interviews
3.5
 • 16 Interviews
1.8
 • 1 Interview
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Trainee Programmer Interview Questions
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
65 L+

Reviews

4 L+

Interviews

4 Cr+

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