You are on page 1of 4

6/25/2019 AMCAT Coding Questions and Answers PDF Test 2018 Java | Geek Plac..

AMCAT Coding
Questions and
Answers PDF for
Test
AMCAT Coding Questions are of moderate to
high dif culty and the Languages that you’re
allowed to code in are C, C++, C# and Java.
Below you will nd questions that you must
practice before giving any AMCAT Exam.

1. Number of Questions – 2
1. Generally one easy
2. One medium dif culty

Question 1

Question 2

Question 3

Question 4

Question 5

decimal to octal converter

Octal number system: It is base 8 number


system which uses the digits from 0 to 7.

geekplacement.com/amcat/coding.html 1/4
6/25/2019 AMCAT Coding Questions and Answers PDF Test 2018 Java | Geek Plac..

Decimal number system:


It is base 10 number system which uses the
digits from 0 to 9

Decimal to octal conversion method:

Step 1: Divide the original decimal


number by 8
Step 2: Divide the quotient by 8
Step3: Repeat the step 2 until we get
quotient equal to zero.

Result octal number would be remainders of


each step in the reverse order.

Decimal to octal conversion with example:

For example we want to convert decimal


number 525 in the octal.

Step 1: 525 / 8 Remainder : 5 , Quotient : 65


Step 2: 65 / 8 Remainder : 1 , Quotient : 8
Step 3: 8 / 8 Remainder : 0 , Quotient : 1
Step 4: 1 / 8 Remainder : 1 , Quotient : 0

So equivalent octal number is: 1015


That is (525)10 = (1015)8

#include
int main() {
long int decimalNumber,remainder,
int octalNumber[100],i=1,j;
printf("Enter any decimal number
scanf("%ld",&decimalNumber);
quotient = decimalNumber;
while(quotient!=0) {
octalNumber[i++]= quotient % 8;
quotient = quotient / 8;
}
printf("Equivalent octal value of
for (j = i -1 ;j> 0;j--)
geekplacement.com/amcat/coding.html 2/4
6/25/2019 AMCAT Coding Questions and Answers PDF Test 2018 Java | Geek Plac..

printf("%d",octalNumber[j]);
return 0;
}

Question 6

AMCAT Coding Questions in


Java

AMCAT Coding Asked Asked Asked


Questions in Java in C in C++

Pattern based Yes Yes Yes


Questions

Logical thinking Yes Yes Yes

Mathematical Yes Yes Yes


Operations

Data Structures No No No

Matrices Yes Yes Yes

geekplacement.com/amcat/coding.html 3/4
6/25/2019 AMCAT Coding Questions and Answers PDF Test 2018 Java | Geek Plac..

Comments Community 
1 Login

 Recommend t Tweet f Share Sort by Best

Start the discussion…

LOG IN WITH
OR SIGN UP WITH DISQUS ?

Name

Be the first to comment.

✉ Subscribe d Add Disqus to your siteAdd DisqusAdd

HOME IT COMPANIES PAPERS AMCAT COCUBES INFOSYS ELITMUS SYLLABUS


TCS ION CCQT TCS OFFCAMPUS DRIVE FOR 2019 BATCH FRESHERS
TCS NQT 2020 REGISTRATION

Copyright © 2019 Geek Placements — Activation WordPress theme by GoDaddy

geekplacement.com/amcat/coding.html 4/4

You might also like