InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Write a C++ program for generating the Fibonacci series. |
|
Answer» The Fibonacci series is a number sequence in which each number is the sum of the previous two numbers. Fibonacci series will have 0 followed by 1 as its first two numbers. The Fibonacci series is as follows: The below-given program will display the Fibonacci series of n range of numbers given by the user. If the entered range value is 1, the num1 value will be printed, i.e., 0. If the entered range value is 2, num1 and num2 values will be printed, i.e., 0 and 1. If entered range value is n, num1 and num2 value will be printed. Along with that, each next term will be calculated based on the addition of the previous two numbers and this process continues until it generates n numbers in a Fibonacci series. #include<iostream.h>#include<conio.h>void main(){ int num1,num2,nextnum,n,i; cout<<"Enter the value for range:"; //Fibonacci series range value will be inputted cin>>n; num1=0; num2=1; cout<<"Fibonacci series is:"<<endl; if(n==1) cout<<num1<<endl; //Single value will be printed if range value is 1 else if(n==2) cout<<num1<<"\t"<<num2<<endl; //Two values will be printed if the range value is two else { cout<<num1<<"\t"<<num2<<"\t"; for(i=3;i<=n;i++) //Fibonacci series will be printed based on range limit { nextnum=num1+num2; cout<<nextnum<<"\t"; num1=num2; num2=nextnum; } } getch();}ConclusionAccenture is among the leading Fortune 500 companies across the globe with revenue and profits better than most of the MNCs. It is also well-known for its diverse and robust work culture. Obtaining a career at Accenture would help you to upgrade your career growth and knowledge base. Accenture recruits many candidates EVERY year for their several job opportunities. The candidates should put all their efforts to achieve their goals and the organization should pace up the process to gain more fame in the long run. Recently, Accenture has also ANNOUNCED that it is going to hire PLENTY of candidates across various roles, and hence this is an opportunity to give it your best shot. Hope this article ASSISTS you to get more information about the Accenture interview process and help you ace through it. We have focused to cover the various aspects like Accenture company profile, Accenture interview questions for freshers/experienced, Accenture HR interview questions, Accenture technical interview questions, here in this article. Now brace yourself for every question thoroughly as this article is going to upgrade your understanding of the Accenture recruitment process. Useful Resources: SQL Interview Java Interview C++ Interview Python Interview |
|
| 2. |
What is XML? |
|
Answer» XML(Extensible Markup Language) is a mark-up language that states rules for document encoding formatting in such a WAY that it can be easily understood by both humans and machines. It is USEFUL to describe the data, develop information formats, and SHARE structured data through the internet. |
|
| 3. |
What is a map() function in Python? |
Answer»
Output: 20, 40, 60, 80 In the above code segment, we are passing the addition() function and number as parameters to the map() function. Now, the addition() function will be applied to every element of the number tuple, each ITEM value is ADDED with the same item value and the result generated will be stored in the res list. |
|
| 4. |
What is the difference between dictionary and tuple in Python? |
||||||||||
Answer»
|
|||||||||||
| 5. |
What is a classifier in Python? |
|
Answer» A classifier is an algorithm that PREDICTS the class of an input element on the basis of a set of features. Usually, it will make use of training data(large datasets used to train an algorithm or machine learning model) to obtain understand-ability regarding the relation between input variables and class. It is mainly used in machine learning and supervised learning. Example: A classifier can be used to predict the soap category depending on its characteristics, which MEANS its “features”. These features may include its fragrance, appearance, color, ETC. A machine learning classifier COULD potentially be used to predict that soap with a round shape and brown color along with a strong fragrance of sandalwood is a Mysore SANDAL soap. |
|
| 6. |
Can you give differences for the Primary key and Unique key in SQL? |
||||||||||
Answer»
|
|||||||||||
| 7. |
What is normalization in the database? |
Answer»
|
|
| 8. |
What is meant by the Friend function in C++? |
Answer»
|
|
| 9. |
Explain about getch() function in a C++ program. How it is different from getche() function? |
|
Answer» The GETCH() is a pre-defined LIBRARY function in C++ that is used to receive a single input character from the keyboard, and it holds the SCREEN until it does not receive any character from standard input. This function does not require any arguments and it is defined under the “conio.h” header file. #INCLUDE<iostream.h> #include<conio.h>void main() { cout<<"Enter the character:"<<endl; getch(); }This program holds the output screen until you press any character on the keyboard. The only difference between these TWO functions is getch() does not echo the character to the screen whereas getche() does. |
|
| 10. |
Explain memory allocation process in C. |
Answer»
|
|
| 11. |
Can you differentiate between “var++” and “++var”? |
|
Answer» EXPRESSIONS “var++” and “++var” are used for incrementing the value of the “var” variable. “var++” will first give the evaluation of expression and then its value will be INCREMENTED by 1, thus it is CALLED as post-incrementation of a variable. “++var” will increment the value of the variable by one and then the evaluation of the expression will take place, thus it is called pre-incrementation of a variable. |
|
| 12. |
What are lambda expressions in Java? |
Answer»
In the above example program, Example Interface is the functional interface that has a single abstract method abstractPrint(). By using lambda expression within InterviewBit class, we are implementing the functional interface by providing implementation code for the abstract method within an interface. |
|
| 13. |
How can you differentiate between C, C++, and Java? |
|||||||||||||||||||||
Answer»
|
||||||||||||||||||||||
| 14. |
What is the “Diamond problem” in Java? |
|
Answer» The “DIAMOND problem” usually happens in multiple inheritances. Java does not support multiple inheritances, so in the case of Java, the diamond problem occurs when you are trying to implement multiple interfaces. When two interfaces having METHODS with the same signature are implemented to a single class, it creates ambiguity for the compiler about which function it has to CALL, so it produces an error at the compile time. Its STRUCTURE looks similar to diamond thus it is called a “Diamond problem”. Here, if we try to access the print() function using the DerivedClass3 object, it will create confusion for the compiler that which copy of the print() function it has to call i.e., from DerivedClass1 or DervivedClass2. “Diamond problem” is solved by using virtual inheritance. It guarantees that the child class will get only one instance of the common base class. |
|
| 15. |
Distinguish between Array and ArrayList provided by Java. |
||||||||||||
Answer»
|
|||||||||||||
| 16. |
What is run-time polymorphism and how it is achieved in Java? |
Answer»
Output: Inside AnimalInside BirdsInside MammalsInside Reptiles |
|
| 17. |
What is the significance of the “super” and “this” keywords in Java? |
Answer»
|
|
| 18. |
Can we implement multiple interfaces in a single Java class? |
|
Answer» Yes, it is allowed to implement multiple interfaces in a single class. In Java, multiple INHERITANCES is achieved by implementing multiple interfaces into the class. While implementing, each interface NAME is separated by using a comma(,) operator. Here, X and Y are the interfaces implemented by the class InterviewBit. |
|
| 19. |
What is the use of “static” keyword in Java? |
Answer»
|
|