Get free ebooK with 50 must do coding Question for Product Based Companies solved
Fill the details & get ebook over email
Thank You!
We have sent the Ebook on 50 Must Do Coding Questions for Product Based Companies Solved over your email. All the best!

How To Crack Accenture Coding Test

Last Updated on July 26, 2024 by Abhishek Sharma

Cracking the Accenture Coding Test is a significant milestone for many aspiring software engineers. Accenture, being one of the leading global professional services companies, offers vast opportunities for growth and development. To secure a position at Accenture, it is essential to perform well in their coding test, which is designed to assess your problem-solving abilities, coding skills, and understanding of fundamental programming concepts. This guide aims to provide you with comprehensive insights, tips, and strategies to help you ace the Accenture Coding Test and take the first step towards a promising career with Accenture.

Most of Accenture Coding questions will be of the same pattern which are discussed in this article.

If you want to crack the exam in the first attempt then you’ve practiced more and more coding questions which were asked in the previous years.
You can solve these questions using any of the programming languages from C, C++, Java, and Python. So you don’t need to master all the programming languages, just master any of the one programming language.

You can now get one step closer to your dream job and streamline your placement preparation journey with PrepBytes Placement Programs

Marking Scheme of Accenture Coding Section

The candidates who clear all the first two rounds will have to go through the third round which is the coding round. All the candidates will have to solve 2 questions in 45 minutes. So to pass the third round and get your dream job at least you’ve to achieve one partial output. But the second question should be completely solved.
So to get passed in this section the candidate should get one partial output and one complete output.

Resources To Prepare For Accenture Coding Test

Before we jump into the previously asked Accenture coding questions. Prepbytes has launched the best PrepBytes, TCS, IBM, Infosys, and other similar exams and companies.

Question 1 Problem Statement – Vohra went to a movie with his friends in a Wave theater and during break time he bought pizzas, puffs and cool drinks. Consider the following prices :

  • Rs.100/pizza
  • Rs.20/puffs
  • Rs.10/cooldrink

Generate a bill for What Vohra has bought.
Sample Input 1:

  • Enter the no of pizzas bought:10
  • Enter the no of puffs bought:12
  • Enter the no of cool drinks bought:5
    Sample Output 1:
    Bill Details
  • No of pizzas:10
  • No of puffs:12
  • No of cooldrinks:5
  • Total price=1290
#include
#include
int main ()
{
int totalprice;
printf ("Enter the no of pizzas bought:\n");
int pizza;
scanf ("%d", &pizza);

printf ("Enter the no of puffs bought:\n");
int puffs;
scanf ("%d", &puffs);

printf ("Enter the no of cool drinks bought:\n");
int coolDrinks;
scanf ("%d", &coolDrinks);

int pizzaa = pizza * 100;
int puffss = (puffs) * 20;
int coolDrinkss = (coolDrinks) * 10;

printf ("Bill Details\n");
printf ("No of pizzas: %d\n", pizza);
printf ("No of puffs: %d\n", puffs);
printf ("No of cooldrinks: %d\n", coolDrinks);

totalprice = pizzaa + puffss + coolDrinkss;
printf ("Total price= %d\n", totalprice);
printf ("ENJOY THE SHOW!!!");

return 0;
}

Question 2:Problem Statement – Ritik wants a magic board, which displays a character for a corresponding number for his science project. Help him to develop such an application.
For example when the digits 65,66,67,68 are entered, the alphabet ABCD is to be displayed.
[Assume the number of inputs should be always 4 ]

Sample Input 1:

  • Enter the digits:
    65
    66
    67
    68

Sample Output 1:
65-A
66-B
67-C
68-D

Sample Input 2:

  • Enter the digits:
    115
    116
    101
    112
    Sample Output 2:
    115-s
    116-t
    101-e
    112-p
import java.util.Scanner;
public class Main
{
public static void main (String args[])
{
Scanner in = new Scanner (System.in);
System.out.println ("Enter the digits: ");

int a = in.nextInt ();
int b = in.nextInt ();
int c = in.nextInt ();
int d = in.nextInt ();

char q = (char) a;
char w = (char) b;
char e = (char) c;
char r = (char) d;

System.out.println ();
System.out.print (a);
System.out.println ("-" + q);

System.out.print (b);
System.out.println ("-" + w);

System.out.print (c);
System.out.println ("-" + e);

System.out.print (d);
System.out.println ("-" + r);
}
}

Question 3: Problem Statement – Rhea Pandey’s teacher has asked her to prepare well for the lesson on seasons. When her teacher tells a month, she needs to say the season corresponding to that month. Write a program to solve the above task.

  • Spring – March to May,
  • Summer – June to August,
  • Autumn – September to November and,
  • Winter – December to February.

Months should be in the range 1 to 12. If not, the output should be “Invalid month”.

Sample Input 1:

  • Enter the month:11

Sample Output 1:

  • Season:Autumn

Sample Input 2:

  • Enter the month:13

Sample Output 2:

  • Invalid month
import java.util.Scanner;
public class Main 
{
public static void main(String args[])
{
System.out.print("Enter the month:");
Scanner s = new Scanner(System.in);
int entry = s.nextInt();

switch (entry)
{
case 12:
case 1:
case 2:
System.out.println("Season:Winter");
break;
case 3:
case 4:
case 5:
System.out.println("Season:Spring");
break;
case 6:
case 7:
case 8:
System.out.println("Season:Summer");
break;
case 9:
case 10:
case 11:
System.out.println("Season:Autumn");
break;
default:
System.out.println("Invalid month");
}
}
}

Question 4: To speed up his composition of generating unpredictable rhythms, Blue Bandit wants the list of prime numbers available in a range of numbers.Can you help him out?
Write a program program to print all prime numbers in the interval [a,b] (a and b, both inclusive).

Note

  • Input 1 should be less than Input 2. Both the inputs should be positive.
  • Range must always be greater than zero.
  • If any of the condition mentioned above fails, then display “Provide valid input”
  • Use a minimum of one for loop and one while loop

Sample Input 1:
2
15

Sample Output 1:
2 3 5 7 11 13

Sample Input 2:
8
5

Sample Output 2:
Provide valid input

#include
#include
int main()
{
    int a,b;
    scanf("%d%d",&a,&b);
int flag;
if(a<=0 || b<=0 || a>=b)
printf("Provide valid input");
else
{
while(a<=b)
{
if(a==2)
printf("%d ",a);
else if(a==1)
{
a++;
continue;
}
else
{
flag=0;
for(int i=2;i<=a/2;i++)
{
if(a%i==0)
{
flag=1;
break ;
}
}

if(flag==0)
printf("%d ",a);
}
a++;
}
}

return 0;
}

Question 5: Problem Statement:
Problem Statement – Chaman planned to choose a four digit lucky number for his car. His lucky numbers are 3,5 and 7. Help him find the number, whose sum is divisible by 3 or 5 or 7. Provide a valid car number, Fails to provide a valid input then display that number is not a valid car number.

Note : The input other than 4 digit positive number[includes negative and 0] is considered as invalid.
Refer the samples, to read and display the data.

Sample Input 1:

  • Enter the car no:1234

Sample Output 1:

  • Lucky Number

Sample Input 2:

  • Enter the car no:1214

Sample Output 2:

  • Sorry it’s not my lucky number

Sample Input 3:

  • Enter the car no:14

Sample Output 3:

  • 14 is not a valid car number
#include 
using namespace std;
int main ()
{

int n;
cin >> n;

int digit = floor (log10 (n) + 1);

if (n <= 0 or ! (digit == 4))
cout << n << " is not a valid car number";

else
{

int sum = 0;

while (n > 0)
{
sum += n % 10;
n /= 10;
}

if (sum % 3 == 0 or sum % 5 == 0 or sum % 7 == 0)
cout << "Lucky Number";

else
cout << "Sorry its not my lucky number";
}

return 0;
}

Conclusion
Successfully cracking the Accenture Coding Test requires a blend of technical knowledge, strategic preparation, and consistent practice. By understanding the test structure, focusing on key programming concepts, and honing your problem-solving skills, you can significantly enhance your chances of success. Remember to leverage the resources available, such as coding platforms, mock tests, and study groups, to reinforce your learning. With dedication and the right approach, you can excel in the Accenture Coding Test and move closer to achieving your career aspirations with one of the world’s top consulting firms.

How To Crack Accenture Coding Test FAQs

Here are some FAQs related to How To Crack Accenture Coding Test:

1. What is the format of the Accenture Coding Test?
The Accenture Coding Test typically consists of multiple coding questions that assess your problem-solving abilities and programming skills. The test may also include multiple-choice questions on computer science fundamentals.

2. Which programming languages are allowed in the Accenture Coding Test?
You can usually choose from a variety of programming languages such as C, C++, Java, Python, and others, depending on the specific test guidelines provided by Accenture.

3. How can I prepare for the Accenture Coding Test?
Preparation involves practicing coding problems on platforms like LeetCode, HackerRank, and CodeChef, understanding key data structures and algorithms, and reviewing previous test questions if available.

4. Are there any specific topics I should focus on for the coding test?
Focus on common topics such as arrays, strings, linked lists, trees, graphs, dynamic programming, and sorting algorithms. Additionally, understanding time and space complexity is crucial.

5. How important is time management during the test?
Time management is critical as you need to efficiently allocate time to each question. Practice solving problems within a set time limit to improve your speed and accuracy.

6. Can I use an integrated development environment (IDE) during the test?
This depends on the test guidelines provided by Accenture. Some tests may allow the use of IDEs, while others might require you to code in a browser-based editor.

7. What resources can I use to practice for the coding test?
Use online coding platforms such as LeetCode, HackerRank, CodeChef, and GeeksforGeeks for practice problems and contests. Additionally, refer to standard textbooks on data structures and algorithms.

Leave a Reply

Your email address will not be published. Required fields are marked *