Accenture Codingquestions PDF
Accenture Codingquestions PDF
Input:
bB1_89
Output:
Input:
1 aA_1
Output:
Input: 1
abc_@89 Input:
Output: Abc @89
0 Output:
0
Question 2
Conditions:
•The priority of the operator is not required.
•The length of the string is always Odd.
•If the length of the string is null then return -1.
Explanation:
The entered input string is 1 XOR 0 XOR 1 XOR 1 AND 0 OR 1.
Now calculate the string without an operator priority and scan the string
characters from left to right. Now calculate the result and return the desired
output.
Note: This will convert the char into the num (char – ‘0’) in the c++ language
Question 3
Consider: a and b are greater than 0. i.e a>0 and b>0. And their sum should
lies between the integral range.
Question 3
Sample input:
34795864
Sample output:
98765443
Question 5
Execute this function: Int Numberofcarry(Integer num 1, Integer num 2)
When the sum of the digits exceeds a total of 9, a carry digit is added to
the right-left of the digit.
In simple terms, if the given number’s digits from left to right represent
the frequency of 0, 1, 2, 3, 4.... N respectively present in the given
number then that number is known as Autobiographical number.