Friday, 8 December 2017

Salesforce Interview Questions

EXPLAIN WHAT IS SALES FORCE?

Salesforce is a CRM delivered as a software-as-a-service (SaaS).

WHAT ARE CUSTOM OBJECTS IN SALESFORCE?

Simply put custom objects are the database tables in Salesforce. All the data related to the enterprise can be stored in Salesforce.com. These custom objects have to be defined first and then the following steps need to be taken:
  • Join records with custom objects.
  • The custom object data are displayed in custom lists.
  • Create a custom tab for custom object.
  • Building page layouts.
  • Creating dashboard & report for analyzing custom object.
  • The custom tab, app and object can be shared

MENTION CHANGING WHAT MAY CAUSE DATA LOSS?

Data loss may cause due to following reasons
  • Changing data and date-time
  • Altering to percent,number and currency from other data types
  • Changing from multi-select picklist, checkbox, auto number to other types
  • Altering to multi-select picklist from any type except picklist
  • Changing to auto-number except from text
  • Changing from text-area to e-mail, phone, URL and text

DEFINE OBJECT RELATIONSHIP OVERVIEW

In Salesforce you can link the standard and custom object records in a related list. It is done by Object relationship overview. Various types of relationships can be created in order to connect the specific business cases with specific customers. It is possible to create custom relationship on an object and define various relationship types.

EXPLAIN THE ADVANTAGES OF SALESFORCE SAAS FUNCTIONALITY?

Some of the main benefits of Salesforce SaaS are:
  • A pay-as-you-go model perfectly suited for all customers.
  • No hassle of infrastructure management.
  • All applications are accessed via internet.
  • Easy integration between various applications.
  • Latest features are provided without any delay.
  • Guaranteed uptime and security.
  • Scalable performance for various operations.
  • Ability to access via mobile devices from anywhere

HOW MANY RELATIONSHIPS ARE PRESENT IN SALESFORCE?

The two important relationships in Salesforce include:
  • Lookup relationship.
  • Master detail relationship

EXPLAIN THE VARIOUS STANDARD PROFILES IN SALESFORCE?

  • System Administrator –Customization and administration of the application.
  • Standard User –Can edit, view, update or delete one’s own record.
  • Read Only –Able to just view the records.
  • Solution Manager –Comes with standard user permission but also can manage categories and published solutions.
  • Marketing User –Is able to import leads into the organization along with standard user permissions

WHAT IS A TRIGGER IN SALESFORCE?

A Trigger is just a code that is executed before or after a record is inserted or updated.

EXPLAIN THE FORCE.COM PLATFORM

Force.com is the entire infrastructure and codebase on which the complete Salesforce application exists. In other words Salesforce is built on Force.com which is a Platform as a Service (PaaS) that lets to simplify the design, development and deployment of cloud-based applications and websites. Salesforce developers can work with Cloud Integrated Development Environment and deploy the applications on the Force.com servers

LIST THE VARIOUS TYPES OF REPORTS AVAILABLE IN SALESFORCE

  • Tabular report :In this the grand total is displayed in a table format.
  • Matrix report :An in-depth report wherein the there is both row –based and column-based grouping.
  • Summary report :A report in which the grouping is on the column basis.
  • Joined report :A joining of two or more reports into one

HOW MANY REPORTS CAN BE ADDED TO THE SALESFORCE DASHBOARD?

A Salesforce Dashboard can be seen as a visual and pictorial representation of a report with the facility to add up to 20 reports within a single dashboard.

EXPLAIN THE VARIOUS DASHBOARD COMPONENTS?

The various Dashboard components are explained below:
  • Chart :it is used for showing data graphically.
  • Gauge :it is used for showing a single value within a range of custom values.
  • Metric :this is used for displaying a single key value – it is possible to click empty text field next to grand total and enter the metric label directly on components. All metrics placed above and below one another in dashboard column
the various Dashboard components are explained below:
would be displayed as a single component.
  • Table :Showing report data in column form using the Table.
  • Visualforce Page :It is used for creating custom component or showing information not available in other component type.
  • Custom S –component: this contains the content that is run or displayed in a browser like Excel file, ActiveX Control, Java applet or custom HTML web form.

WHAT IS VISUALFORCE IN FORCE.COM?

The Visualforce can be defined as the user interface for the Force.com platform. It is a component-based framework that can include over 100 built-in components. It includes a tag-based markup language and each Visualforce tag corresponds to a page or field.
The Visualforce framework works on the standard MVC paradigm. It is possible to have a tight integration with the database and also deploy auto-generated controllers for database objects. Developers can use Apex codes to write own controllers. It is also possible to access AJAX components or create your own components.

LIST THE VARIOUS OBJECT RELATIONS IN SALESFORCE?

  • One to many.
  • Many to many.
  • Master detail

WHAT IS A STATIC RESOURCE IN SALESFORCE?

A static resource lets you upload content that is in the form of .jar, .zip format, style sheets, JavaScript and so on. It is recommended to deploy a static resource rather than uploading file to the Documents tab since it is possible to package a set of files into a directory hierarchy and upload it. These files can be easily referred to in a Visualforce page.

DIFFERENTIATE BETWEEN SALESFORCE OBJECT QUERY & OBJECT SEARCH LANGUAGE?

Salesforce Object Query Language (SOQL) lets you search only one object whereas the Salesforce Object Search Language (SOSL) lets you search multiple objects. You can query all types of fields in SOQL but you can query only text, email and phone number in SOSL. Data Manipulation Language operations can be performed on query results but not on search results.

HOW SALES FORCE IS USEFUL IN TRACKING SALES?

Sales force records all the basic details like the number of customers served daily, daily sales volume, sales manager detailed reports, sales numbers in each month or quarter.  Also, it keeps a track on the repeat customer, which is key to success for any sales organization.

C Interview Questions

WHAT ARE DIFFERENT TECHNIQUES FOR MAKING HASH FUNCTION?

Techniques for making hash function.
• Truncation Method
This is the simplest method for computing address from a key.In this method we take only a part of the key as address.
• Midsquare Method
In this method the key is squared and some digits from the middle of this square are taken as address.
• Folding Method
In this technique, the key is divided into different part where the length of each part is same as that of the required address, except possibly the last part.
• Division Method (Modulo-Division)
In Modulo-Division method the key is divided by the table size and the remainder is taken as the address of the hash table.
–>Let the table size is n then
H (k) =k mod n
Master C and Data Structure, in this C and Data Structure certification training.

WHAT ARE THE ISSUES THAT HAMPER THE EFFICIENCY IN SORTING A FILE?

The issues are:
  • Length of time required by the programmer in coding a particular sorting program.
  • Amount of machine time necessary for running the particular program.
  • The amount of space necessary for the particular program.

WHAT IS THE USE OF VOLATILE KEYWORD?

The modifier ‘volatile’ tells the compiler that a variable’s value may be changed in ways not explicitly specified by the program. For example, a global variable’s address may be passed to the operating system’s clock routine and used to hold the system time.
In this situation, the contents of the variable are altered without any explicit assignment statements in the program.
This is important because most C compilers automatically optimize certain expressions by assuming that a variable’s content is unchanging if it does not occur on the left side of an assignment statement. Thus, it may not be reexamined each time it is referenced. Also, some compilers change the order of evaluation of an expression during the compilation process. The volatile modifier prevents these changes.

WRITE A C PROGRAM WITHOUT USING SEMICOLON TO PRINT ‘HELLO WORLD’

void main(){
if(printf(“Hello world”)){
}
}

WHAT ARE DIFFERENCES BETWEEN SIZEOF OPERATOR AND STRLEN FUNCTION?

sizeof is keyword of C that can find size of a String constant including null character, but strlen is function which has been defined string.h and can find number of characters in a string excluding null character.
#include
void main(){
int a,b;
a=strlen(“cquestionbank”);
b=sizeof(“cquestionbank”);
printf(“%d  %d”,a,b);
getch();
}

WHAT IS THE DIFFERENCE BETWEEN

sprintf(…) writes data to the character array. The C library function sprintf () is used to store formatted data as a string. You can also say the sprintf () function is used to create strings as output using formatted data. The syntax of the sprintf () function is as follows:
int sprintf (char *string, const char *form, … );
Here, the *string will stand for the name of the array that will store the output obtained by working on the formatted data. The *form parameter will show the format of the output.
printf(…) writes data to the standard output device. The printf function is just a useful function from the standard library of functions that are accessible by C programs.
The behavior of printf is defined in the ANSI standard. If the compiler that you’re using conforms to this standard then all the features and properties should be available to you.

WHEN DOES THE COMPILER NOT IMPLICITLY GENERATE THE ADDRESS OF THE FIRST ELEMENT OF AN ARRAY?

The compiler does not implicitly generate the address of the first element of an array whenever an array name appears:
– as an operand of the sizeof operator
– as an operand of & operator
– as a string literal initialize for a character array

IS USING EXIT() THE SAME AS USING RETURN?

No, the exit() function is used to exit your program and return() controls the operating system.
The return statement is used to return from a function and return control to the calling function. If you make a return from the main() function, you are essentially returning control(operating system) to the calling function. In this case, the return statement and exit() function are similar.

WHAT IS AN LVALUE?

An lvalue is an expression to which a value can be assigned. The lvalue expression is located on the left side of an assignment statement whereas an rvalue is located on the right side of an assignment statement.
Each assignment statement must have an lvalue and an rvalue. The lvalue expression must refer a storable variable in memory. It cannot be a constant.

WHAT IS THE DIFFERENCE BETWEEN GOTO, LONGJMP() AND SETJMP()?

  • A goto statement implements a local jump of program execution whereas the longjmp() and setjmp() functions implement a nonlocal or far jump of the program execution.
  • Generally, a jump in any execution should be avoided because it is not considered good programming practice to use such statements as goto and longjmp in your program.
  • A goto statement simply bypasses code in your program and jumps to a predefined position. To use the goto statement, you give it a labeled position to jump to. This predefined position must be within the same function. You cannot implement goto between functions.
    However, when your program calls setjmp(), the current state of your program is saved in a structure of type jmp_buf. Later, your program can call the longjmp() function to restore the program’s state as it was when you called setjmp().Unlike the goto statement, the longjmp() and setjmp() functions do not need to be implemented in the same function.
    There is a major drawback of using these functions: your program, when restored to its previously saved state, it will lose its references to any dynamically allocated memory between the longjmp() and the setjmp(). This means you will waste memory for every malloc() or calloc() you have implemented between your longjmp() and setjmp(), and your program will be inefficient.
    It is highly recommended that you avoid using functions such as longjmp() and setjmp() because they, like the goto statement, are quite often an indication of poor programming practice.

WHAT IS XOR LINKED LIST?

XOR linked list is a Memory Efficient Doubly Linked List. An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. A memory efficient version of Doubly Linked List can be created using only one space for address field with every node. This memory efficient Doubly Linked List is called XOR Linked List or Memory Efficient as the list uses bitwise XOR operation to save space for one address.
In the XOR linked list, instead of storing actual memory addresses, each node stores the XOR of addresses of previous and next nodes.
XOR List Representation:
Let us call the address variable in XOR representation npx (XOR of next and previous)
Node A:
npx = 0 XOR add(B) // bitwise XOR of zero and address of B
Node B:
npx = add(A) XOR add(C) // bitwise XOR of address of A and address of C
Node C:
npx = add(B) XOR add(D) // bitwise XOR of address of B and address of D
Node D:
npx = add(C) XOR 0 // bitwise XOR of address of C and 0

WHAT IS ‘TRIE’ IN DATA STRUCTURE?

Trie is efficient information retrieval data structure. Using trie, search complexities can be brought to optimal limit (key length). If we store keys in binary search tree, a well balanced BST will need time proportional to M * log N, where M is maximum string length and N is number of keys in tree.
• Using trie, we can search the key in O(M) time. However, the penalty is on trie storage requirements.
• Each node of trie consists of multiple branches. Each branch represents a possible character of keys.
• We need to mark the last node of every key as leaf node.
• A trie node field value will be used to distinguish the node as leaf node (there are other uses of the value field).
• A simple structure to represent nodes of English alphabet can be as follows:
struct trie_node
{
int value; /* Used to mark leaf nodes */
trie_node_t *children[ALPHABET_SIZE];
};
Become Master of C & Data Structure by going through this online training course.

WHAT DO YOU UNDERSTAND BY SPLAY TREE?

Splay tree is a self-balancing Binary Search Tree (BST). The main idea of splay tree is to bring the recently accessed item to root of the tree. This makes the recently searched item to be accessible in O (1) time if accessed again. The idea is to use locality of reference (In a typical application: 80% of the access are to 20% of the items).
Imagine a situation, where we have millions or billions of keys and only few of them are accessed frequently, which is very likely in many practical applications.
All splay tree operations run in O(log n) time on average, where n is the number of entries in the tree. Any single operation can take Theta(n) time in the worst case.

WHAT IS TREAP?

Treap is a Balanced Binary Search Tree, but not guaranteed to have height as O(Log n). The idea is to use Randomization and Binary Heap property to maintain balance with high probability. The expected time complexity of search, insert and delete is O(Log n).
Each node of Treap maintains two values.
  1. Key follows standard BST ordering (left is smaller and right is greater)
  2. Priority Randomly assigned value that follows Max-Heap property.
  3. How to implement LRU caching scheme? What data structures should be used?
We are given total possible page numbers that can be referred. We are also given cache (or memory) size (Number of page frames that cache can hold at a time). The LRU caching scheme is to remove the least recently used frame when the cache is full and a new page is referenced which is not there in cache.
We use two data structures to implement an LRU Cache.
  1. A Queue: which is implemented using a doubly linked list. The maximum size of the queue will be equal to the total number of frames available (cache size).
    The most recently used pages will be near front end and least recently pages will be near rear end.
  2. A Hash: with page number as key and address of the corresponding queue node as value. When a page is referenced, the required page may be in the memory. If it is in the memory, we need to detach the node of the list and bring it to the front of the queue.
    If the required page is not in the memory, we bring that in memory. In simple words, we add a new node to the front of the queue and update the corresponding node address in the hash. If the queue is full, i.e. all the frames are full, we remove a node from the rear of queue, and add the new node to the front of queue.
  3. Suppose, there are two linked lists: L1 and L2 (of same lengths) that intersect at a particular node N1, which is a common endpoint to all other nodes. What are the possibilities to find N1?
Linear solution is possible. Have two pointers say P1 pointing to the first node of L1 and P2 to that of L2. Traverse through both the lists. If P1 reaches L1’s last node, point it to the first node of L2 and continue traversing.
Do the same thing for P2 when it reaches L2’s last node. (By doing this, we are balancing the difference in the length between the linked lists. The shorter one will get over soon and by redirecting to longer list’s head, it will traverse the extra nodes also). Finally, they will meet at the Intersection node.

GIVEN TWO KEYS K1 & K2, WRITE AN ALGORITHM TO PRINT ALL THE ELEMENTS BETWEEN THEM WITH K1<=K2 IN A BST.

  • Linear solution is possible without using any extra space.
  • Perform an inorder traversal.
  • Once you find K1, print it and continue traversal now.
  • Print all other traversed elements until you reach K2.

HOW MANY STACKS ARE REQUIRED TO IMPLEMENT A QUEUE.

Two stacks are required to implement a Queue.
  • For Enqueue:Take two stacks S1 and S2 and perform push on S1.
  • For Dequeue:If S2 is empty, pop all the elements from S1 and push it to S2. The last element you popped from S1 is an element to be dequeued. If S2 is not empty, then pop the top element in it.

WHAT ARE THE FEATURES OF C LANGAUGES?

  •  In C one can write programs like that of high level languages as in COBOL, BASIC, FORTRAN etc. as well as it permits very close interaction with the inner workings of the computer.
  • It is a general purpose programming language. It is usually called system programming language but equally suited to writing a variety of applications.
  •  It supports various data types
  •  It follows the programming style based on fundamental control flow constructions for structured programming 
  • Functions may be predefined or user defined and they may return values of basic types, structures, unions or pointers.

WHAT ARE THE ADVANTAGES OF C LANGUAGE?

  •  Easy to write
  •  Rich set of operators and functions that are built–in
  •  Support for bit–wise operation
  •  Flexible use of pointers
  •  Direct control over the hardware
  •  Ability to access BIOS/DOS routines
  •  Interacting using Interrupts
  •  Ability to write TSR programs
  •  Ability to create .COM files
  •  Ability to create library files (.LIB)
  •  Ability to write interface programs
  •  Incorporating assembly language in C program

WHAT ARE THE DISADVANTAGES OF C LANGUAGE?

  • C is considered difficult to learn
  •  Because of its conciseness, the code can be difficult to follow
  •  It is not suited to applications that require a lot of report formatting and data file manipulation

WHAT ARE THE SALIENT FEATURES OF C LANGUAGES?

 The following are the salient features of C language are :
  •  C is called a middle level language
  •  C supports structured design approach
  •  C is extensible
  •  C is rich in data types and operators
  •  C is portable

WHAT IS A HEADER FILE?

Header files provide the definitions and declarations for the library functions. Thus, each header file contains the library functions along with the necessary definitions and declarations. For example, stdio.h, math.h, stdlib.h, string.h etc.

WHAT IS CHARACTER SET?

Character set is the set of characters allowed and supported in the programming language.
Generally a program is a collection of instructions, which contain groups of characters. Only a limited set of characters is allowed to write instructions in the program.

WHAT IS C TOKEN?

The smallest individual units of a C program are known as tokens.

LIST THE DIFFERENT TYPES OF C TOKENS?

  • Identifiers
  • Keywords
  •  Operators
  • Special symbols
  •  Strings
  • constant

WHAT IS A STRING?

A string is a sequence of characters ending with NUL. It can be treated as a one–dimensional array of characters terminated by a NUL character.

WHAT ARE QUALIFIERS?

Qualifiers or modifiers are identifiers that may precede the scalar data types (except float) to specify the number of bits used for representing the respective type of data in memory. The qualifiers in C are short, long, signed, and unsigned.

WHAT IS A FUNCTION?

A function is a set of statements to perform a specific task.

WHAT IS A CONSTANT?

A constant is a value that does not change during the program execution. A constant used in C does not occupy memory.