By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Q 1. What do you know about multi-threading? Multithreading is that Java feature, which enables concurrent execution for two or more than two parts of one program for the maximum utilization of the CPU. Each and every single part of one such program comes to be known as a thread. Thus, threads are the light-weight processes that too within one process.
Q 2. Write a program to find the square root of a number.
int sqrt(int x) { if (x == 0) return x; int left = 1, right = x; while (true) { int mid = (left + right) / 2; if (mid > x / mid) right = mid - 1; else if (mid + 1 > x / (mid + 1)) //mid < x / mid return mid; else left = mid + 1; } }
Q 3. What is the difference between syntax and fatal errors? One error is some kind of mistake. One can say that an error is one condition of possessing incorrect or inaccurate knowledge. Or the error can be defined as an unexpected, or an invalid state of a program from which recovery is not possible.
syntax errors These parse errors or syntax errors occur when there is some syntax mistake in coding the script, and the output comes to be Parse errors or syntax errors. Such types of errors stop the continuous execution of the required script. There can be several reasons behind the occurrence of such errors in the PHP language. Some common reasons are mentioned below.
The common reason for syntax errors:
Unclosed quotes Unclosed braces Missing or Extra parentheses Missing semicolon Fatal Errors These are caused if PHP is able to comprehend what the user has written, but, what the user is asking PHP to do simply can not be done. These Fatal errors end the continuous execution for the script. When the user tries to access functions that are not defined, then what is received as output is the fatal error.
Q 4. State the features of LinkedIn. There are many attractive and useful features on LinkedIn and they are updated time-to-time. The features of LinkedIn have played a very important role in its popularity. Some important features of LinkedIn are stated below:
Hiding Connections Exporting Connections Deleting, Managing and Editing Skills and Endorsements Creating LinkedIn Showcase Pages Hiding user identity when they view other profiles Saving the searches Adding media to user profiles Sending messages without making a connection
Q 5. Explain the flowchart.
The flowchart is a graphical or a pictorial representation of the algorithm using different symbols, and shapes, plus arrows to demonstrate the process or one program. With the algorithms, one can understand any program easily. The major purpose of the flowchart is analyzing different processes. Various standard graphics can be applied in the flowchart as mentioned below:
Terminal Box - Start / End Process / Instruction Connector / Arrow
Q 6. What do you know about the LinkedIn Influencers' Program? The LinkedIn Influencers' program was launched in the year 2012 in the month of October. This program features global leaders, these global leaders share their professional knowledge and insights with the members of LinkedIn. By records, there are more than 750 influencers on the platform and approximately 74% of these influencers are male. The influencer program is invite-only and has leaders from various industries. People like Bill Gates are also one of their influencers.
Q 7. Write a program to check the closest K nodes to target in BST?
vector closestKValues(TreeNode* root, double target, int k) { vector res; inorder(root, target, k, res); return res; }
void inorder(TreeNode *root, double target, int k, vector &res) { if (!root) return; inorder(root->left, target, k, res); if (res.size() < k) res.push_back(root->val); else if (abs(root->val - target) < abs(res[0] - target)) { res.erase(res.begin()); res.push_back(root->val); } else return; inorder(root->right, target, k, res); }
Q 8. State some Applications of LinkedIn.
Some Applications of LinkedIn are:
It can be used to build and enhance personal brand and goodwill Locating and establishing expertise Can be used for professional networking Can be used to send private or group email messages to contacts Can be used to find jobs For sourcing and hiring employees For the purpose of blogging and updating For joining the public groups and participating in them To share the knowledge To keep track of where the professional contacts that can currently work, this can be also used to replace business cards
Q 9. What is the use of API in LinkedIn developer documents?
The basic use of API in developer documents of LinkedIn is:
For signing into external services by using Linkedin To add items or new attributes to profiles of users For sharing articles and items on the timeline of the user's
10. Write a program to print 'LinkedIn' if a number is divisible by 4 and 6, Linked if it is divisible by 4 and 'in' if it is divisible by 6.
def print_linked_in(number): if number%4 == 0 and number%6 == 0: print("Linkedin") elif number%4 == 0: print("Linked") elif number%6 == 0: print("in")
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.