Salesforce Trainee

Salesforce Trainee Interview Questions and Answers

Updated 31 Oct 2021
search-icon

Q1. Write a program to check if a string is a palindrome or not.

Ans.

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

  • A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward.

  • To check if a string is a palindrome, we can compare the characters from the beginning and end of the string.

  • If the characters match for all positions, the string is a palindrome.

  • We can ignore spaces, punctuation, and case sensitivity when checking for palindromes.

Q2. What is Salesforce, write a trigger, about lightning, clouds

Ans.

Salesforce is a cloud-based CRM platform that helps businesses manage customer interactions and automate sales processes.

  • Salesforce is a customer relationship management (CRM) platform

  • Triggers are used to automate processes in Salesforce

  • Lightning is a user interface framework for building dynamic web applications

  • Salesforce offers various cloud services such as Sales Cloud, Service Cloud, Marketing Cloud, etc.

Salesforce Trainee Interview Questions and Answers for Freshers

illustration image

Q3. What is the use of main function.

Ans.

Main function is the entry point of a program. It is used to execute the code in the program.

  • Main function is required in every program written in C, C++, Java, etc.

  • It is the first function to be executed when the program starts.

  • It can take command line arguments.

  • It returns an integer value to the operating system.

  • Example: int main() { // code to be executed }

Q4. What is a constructor.

Ans.

A constructor is a special method that is used to initialize objects in a class.

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

  • They are called automatically when an object is created.

  • They can be used to set initial values for object properties.

  • Constructors can be overloaded to accept different parameters.

  • Example: public class Person { public Person(String name) { this.name = name; } }

Are these interview questions helpful?

Q5. What are static variables

Ans.

Static variables are variables that are associated with a class, not with an instance of the class.

  • Static variables are declared using the 'static' keyword.

  • They are initialized only once, at the start of the program.

  • They can be accessed without creating an instance of the class.

  • Static variables are shared among all instances of the class.

  • Examples include a counter variable to keep track of the number of instances created, or a constant value that is used throughout the progra...read more

Q6. Program to find Factorial of a number

Ans.

Program to find factorial of a number

  • Use a loop to multiply the number with all the numbers below it

  • Handle the case when the number is 0 or 1 separately

  • Use recursion to find factorial of a number

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Salesforce Trainee Jobs

Salesforce Trainee 0-1 years
ETG
3.4
Hyderabad / Secunderabad
Salesforce Trainees (Freshers) 0-1 years
onactive
5.0
Noida
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

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

Salesforce Trainee 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