AMCAT Previous Years Questions on Computer Programming: Data Types

AMCAT Computer Science Topic Wise Questions

Number of Questions: 26 || Module Duration: 22 min

Sub- Topics
Expected Questions
Basic Programming
10 – 12 Questions
Data Structures
6 – 8 Questions
4 – 6 Questions
4 – 5 Questions

1. What collects all the source code for an application and prepares them to be ready for execution?
A. Executor
B. Loader
C. Linker
D. Compiler

Correct Option: C
In computing, a linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another ‘object’ file.

Question 2. Usain Bolt runs 400 meters race, the timekeeper wants to write a program to save his track timing what kind of a data type should he be using to store the temporary data?
A. int
B. Float
C. Pointer
D. Double

Correct Option: D
The double type of data will give him the highest precision. e.g – 9.59716 secs

Question 3. Raman works in a reputed software company. His manager has asked him to make students sit in an array like position, an array which can store numbers in both negative a[-4] and a[4] and so on in a special compiler. He can only use 8 bytes of addressing. How many people can sit in this array and what is the last negative position?
A. 128, -127
B. 264, -128
C. 264, -127
D. 512, – 127

Correct Option: B
For signed integer the possibilities are 2^8 = 264 However for unsigned we can divide this by 2 i.e. 128. Thus array according the basic storage will be from -128 to +127

Question 4. Paras has to write a code using a consecutive number of registers and these registers can at max have 11 bits. How many signed numbers can he store in this
A. 1024
B. 512
C. 2048
D. 256

Correct Option: C
It is very simple since it is signed thus, 2^11 = 2048 will be the answer

Question 5. Assembler works to convert assembly language program into machine language:
A. Before the computer can execute it
B. After the computer can execute it
C. In between execution
D. All of these

Correct Option: A

Question 6. Prateek has got homework from his teacher to find the numbers bits in a data type that will help me write in Portuguese Language has about 60 letters in it. What are number of bits he must be using –
A. 4
B. 5
C. 6
D. 3

Correct Option: C
Since 2^6 is 64. For 60 a 6 bit integer will be enough

Question 7. Which of the following is not a data type?
A. int
B. float
C. short
D. boolean
E. all the above

Correct Option: D
All of them are data types

Question 8
What is the storage size and the range for short?
A. 4 bytes, 65,534
B.2 bytes, 65,534
C. 2 bytes, -32,768 to 32,767
D. 4 bytes, -32,768 to 32,767

Correct Option: C
Check Data type info here –

Question 9
Which of the following is not derived type of Data Type?
A. Pointer types
B. Array types
C. Enum Type
D. Structure types
E. Union types

Correct Option: C
All except, Enum Type are derived type