Ques 1 : Choose the correct answer | ||||
There is a new data-type which can take as values natural numbers between (and including) 0 and 25. How many minimum bits are required to store this data-type. | ||||
Option 1 : 4 | Option 2 : 5 | Option 3 : 1 | Option 4 : 3 | |
Ques 2 : Choose the correct answer | ||||
A data type is stored as an 6 bit signed integer. Which of the following cannot be represented by this data type? | ||||
Option 1 : -12 | Option 2 : 0 | Option 3 : 32 | Option 4 : 18 | |
Ques 3 : Choose the correct answer | ||||
A language has 28 different letters in total. Each word in the language is composed of maximum 7 letters. You want to create a data-type to store a word of this language. You decide to store the word as an array of letters. How many bits will you assign to the data-type to be able to store all kinds of words of the language. | ||||
Option 1 : 7 | Option 2 : 35 | Option 3 : 28 | Option 4 : 196 | |
Ques 4 : Choose the correct answer | ||||
A 10-bit unsigned integer has the following range: | ||||
Option 1 : 0 to 1000 | Option 2 : 0 to 1024 | Option 3 : 1 to 1025 | Option 4 : 0 to 1023 | |
Ques 5 : Choose the correct answer | ||||
Rajni wants to create a data-type for the number of books in her book case. Her shelf can accommodate a maximum of 75 books. She allocates 7 bits to the data-type. Later another shelf is added to her book-case. She realizes that she can still use the same data-type for storing the number of books in her book-case. What is the maximum possible capacity of her new added shelf? | ||||
Option 1 : 52 | Option 2 : 127 | Option 3 : 53 | Option 4 : 75 | |
Ques 6 : Choose the correct answer | ||||
A new language has 15 possible letters, 8 different kinds of punctuation marks and a blank character. Rahul wants to create two data types, first one which could store the letters of the language and a second one which could store any character in the language. The number of bits required to store these two data-types will respectively be: | ||||
Option 1 : 3 and 4 | Option 2 : 4 and 3 | Option 3 : 4 and 5 | Option 4 : 3 and 5 | |
Ques 7 : Choose the correct answer | ||||
Parul takes as input two numbers: a and b. a and b can take integer values between 0 and 255. She stores a, b and c as 1-byte data type. She writes the following code statement to process a and b and put the result in c. c = a + 2*b To her surprise her program gives the right output with some input values of a and b, while gives an erroneous answer for others. For which of the following inputs will it give a wrong answer? | ||||
Option 1 : a = 10 b = 200 | Option 2 : a = 200 b = 10 | Option 3 : a = 50 b = 100 | Option 4 : a = 100 b = 50 | |
Ques 8 : Choose the correct answer | ||||
Prashant takes as input 2 integer numbers, a and b, whose value can be between 0 and 127. He stores them as 7 bit numbers. He writes the following code to process these numbers to produce a third number c. c = a - b In how many minimum bits should Prashant store c? | ||||
Option 1 : 6 bits | Option 2 : 7 bits | Option 3 : 8 bits | Option 4 : 9 bits | |
Ques 9 : Choose the correct answer | ||||
Ankita takes as input 2 integer numbers, a and b, whose value can be between 0 and 31. He stores them as 5 bit numbers. He writes the following code to process these numbers to produce a third number c. c = 2*(a - b) In how many minimum bits should Ankita store c? | ||||
Option 1 : 6 bits | Option 2 : 7 bits | Option 3 : 8 bits | Option 4 : 9 bits | |
Ques 10 : Choose the correct answer | ||||
A character in new programming language is stored in 2 bytes. A string is represented as an array of characters. A word is stored as a string. Each byte in the memory has an address. The word "Mahatma Gandhi" is stored in the memory with starting address 456. The letter 'd' will be at which memory address? | ||||
Option 1 : 468 | Option 2 : 480 | Option 3 : 478 | Option 4 : 467 |
Here 160 Questions and answers for Amact Programming ..please click below link.
0 comments:
Post a Comment