Bresenham line drawing algorithm is attractive because it uses (A) Real arithmetic only (B) Integer arithmetic only (C) Floating point arithmetic (D) Real and integer arithmetic

1 Answer

Answer :

(B) Integer arithmetic only

Related questions

Description : The correct way to round off a floating number x to an integer value is (A) y = (int)(x+0.5) (B) y = int(x+0.5) (C) y = (int)x+0.5 (D) y = (int)((int)x+0.5)

Last Answer : (A) y = (int)(x+0.5)

Description : Let R be the rectangular window against which the lines are to be clipped using 2D Sutherland-Cohen line clipping algorithm. The rectangular window has lower left-hand corner at (-5,1) and upper righthand corner at (3,7). ... s) is/are candidate for clipping? (A) AB (B) CD (C) EF (D) AB and CD

Last Answer : (D) AB and CD

Description : Which is not the main feature of DEC Alpha: a. 64 Bit RISC processor b. Designed to replace 32 VAX(CISC) c. Seven stage split integer/floating point pipeline d. Variable Instruction length

Last Answer : d. Variable Instruction length

Description : An integer constant in C must have A) At least one digit B) At least one decimal point C) A comma along with digits D) Digits separated by commas

Last Answer : A) At least one digit

Description : Which operation with floating point numbers are more complicated then arithmetic operation with fixed point number . a. Logical operation b. Arithmetic operation c. Both d. None of these

Last Answer : b. Arithmetic operation

Description : Which raster locations would be chosen by Bresenham’s algorithm when scan converting a line from (1, 1) to (8, 5) ?

Last Answer : Answer: C

Description : Consider a line AB with A = (0,0) and B = (8, 4). Apply a simple DDA algorithm and compute the first four plots on this line. (1) [(0, 0), (1, 1), (2, 1), (3, 2)] (2) [(0, 0), (1, 1.5), (2, 2), (3, 3)] (3) [(0, 0), (1, 1), (2, 2.5), (3, 3)] (4) [(0, 0), (1, 2), (2, 2), (3, 2)]

Last Answer : [(0, 0), (1, 1), (2, 1), (3, 2)] 

Description : The IEEE-754 double-precision format to represent floating point numbers, has a length of ........... bits. (A) 16 (B) 32 (C) 48 (D) 64

Last Answer : (D) 64

Description : What are the qualities of a good line drawing algorithm?

Last Answer : Speed and accuracy.

Description : Explain and write steps for DDA line drawing algorithm. 

Last Answer : This algorithm generates a line from differential equations of line and hence the name DDA. DDA algorithm is an incremental scan conversion method. A DDA is hardware or software used for linear interpolation of variables over ... : Steps 1: Read the end points of line (x1,y1) and (x2,y2).

Description : List any two line drawing algorithms. Also, list two merits of any line drawing algorithm.

Last Answer : Line drawing algorithms: Digital Differential Analyzer (DDA) algorithm Bresenham's algorithm Merits of DDA algorithms: It is the simplest algorithm and it does not require special skills ... , and multiplication by 2, which can be accomplished by a simple arithmetic shift operation.

Description : Why do you write ‘Integer.parseInt(br.readLine())’?

Last Answer : A: The inputs in a java program comes in the form of String objects which are read using the br.readLine() function. Now if we want the input in integer form, we have to convert it into integer using the parseInt() function of the Integer wrapper class.

Description : If a variable is declared final, it must include ...................... value. A) integer B) no C) initial D) float

Last Answer : C) initial

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : A method name myMethod( ) that needs two integer arguments is declared as A) public void myMethod( ); B) public void myMethod(int a, int b); C) public void myMethod(int a, b); D) public int myMethod(a, b);

Last Answer : B) public void myMethod(int a, int

Description : Which of the following control expressions are valid for an if statement? A) an integer expression B) a Boolean expression C) either A or B D) Neither A nor B

Last Answer : B) a Boolean expression

Description : If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the following structure would occupy how many bytes ? struct name { int age; char name[30]; }; A) 30 B) 32 C) 34 D) 36

Last Answer : C) 34

Description : If a is an integer variable, a=7/3; will return a value A) 2.5 B) 3 C) 0 D) 2

Last Answer : D) 2

Description : NULL is (A) the same as 0 for integer (B) the same as blank for character (C) the same as 0 for integer and blank for character (D) not a value

Last Answer : (D) not a value

Description : What is the data type of (1)? a) Tuple b) Integer c) List d) Both tuple and integer

Last Answer : b) Integer

Description : A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout atleast once ? (A) 0.5 (B) 0.704 (C) 0.632121 (D) 0.68

Last Answer : (C) 0.632121

Description : Suppose the function y and a fuzzy integer number around -4 for x are given as y=(x-3)2+2 Around -4={(2,0.3), (3,0.6), (4,1), (5,0.6), (6,0.3)} respectively. Then f(Around - 4) is given by: (A) {(2,0.6), (3,0.3), ... 6), (3,1), (6,0.6), (11,0.3)} (D) {(2,0.6), (3,0.3), (6,0.6), (11,0.3)}

Last Answer : (C) {(2,0.6), (3,1), (6,0.6), (11,0.3)}

Description : Consider the following database table : Create table test( one integer, two integer, primary key(one), unique(two), check(one≥1 and ≤10), check(two≥1 and ≤5) ); How many data records/tuples atmost can this table contain ?  (A) 5 (B) 10 (C) 15 (D) 50

Last Answer : (A) 5 

Description : If there are n integers to sort, each integer has d digits and each digit is in the set {1,2, ..., k}, radix sort can sort the numbers in: (A) O(d n k) (B) O(d nk) (C) O((d+n)k) (D) O(d(n+k))

Last Answer : (D) O(d(n+k))

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : Mathematical models using linear, dynamic, integer, or algorithm models are  considered  A. Project selection criteria B. A form of expert judgment C. Project selection methods D. A form of historical information

Last Answer : C. Project selection methods

Description : State true or false. i) comparisons precede logical operations in java ii) assignment operations succeed increment operations iii) arithmetic operations succeed comparisons iv) x precede + A) i-true, ii-true, iii-false, ... false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : A) i-true, ii-true, iii-false, iv-true

Description : Which of the following is allowed in a C Arithmetic Instruction? A) [ ] B) { } C) ( ) D) None of the above

Last Answer : C) ( )

Description : Which is/are the application(s) of stack A) Function calls B) Large number Arithmetic C) Evaluation of arithmetic expressions D) All of the above

Last Answer : D) All of the above

Description : What arithmetic operators cannot be used with strings ? a) + b) * c) – d) All of the mentioned

Last Answer : c) –

Description : Refer the points as listed below: (a) What are the operator precedence rules ? (b) What are the operator associativity rules ? (c) What is the order of operand evaluation ? (d) Are there restrictions on operand evaluation side effects ? ... (d) (C) (a), (b) and (d) (D) (a), (b), (c) and (d)

Last Answer : (D) (a), (b), (c) and (d)

Description : Let A and B be two fuzzy integers defined as: A={(1,0.3), (2,0.6), (3,1), (4,0.7), (5,0.2)} B={(10,0.5), (11,1), (12,0.5)} Using fuzzy arithmetic operation given by (A) {(11,0.8), (13,1), (15,1)} ( ... ,0.2)} (D) {(11,0.3), (12,0.5), (13,0.6), (14,1), (15,0.7), (16,0.5), (17,0.2)}

Last Answer : (D) {(11,0.3), (12,0.5), (13,0.6), (14,1), (15,0.7), (16,0.5), (17,0.2)}

Description : Which of the following is not a lossy compression technique ? (A) JPEG (B) MPEG (C) FFT (D) Arithmetic coding

Last Answer : (D) Arithmetic coding

Description : Which of the following is the most efficient to perform arithmetic operations on the numbers? (A) Sign-magnitude (B) 1’s complement (C) 2’s complement (D) 9’s complement

Last Answer : (C) 2’s complement

Description : Which algorithm includes repeated addition of two predetermined values A and S to a product P and then performs a rightward arithmetic shift on P. a. Booth’s algorithm b. Usual algorithm c. Multiplication algorithm d. None of these

Last Answer : a. Booth’s algorithm

Description : A structure brings together a group of A) items of the same data type B) related data items and variables C) integers with user defined names D) floating points with user defined names

Last Answer : B) related data items and variables

Description : Is anyone here knowledgeable about Variable Rate Demand Notes? (Floating Rate Demand Notes) - they seem to pay attractive interest, but are not regulated or insured.

Last Answer : If you are comfortable with the company, it is probably a good investment. Depends on how much money you are talking about. Is it long term money or short term money. If long term, ... fixed annuities. (NOT VARIABLE ANNUITIES). Despite the similarity in name, they are very very different products.

Description : The Bretton Woods Agreement of 1944 established a monetary system based on A. Gold and managed floating exchange rates B. Gold and adjustable pegged exchange rates C. Special Drawing Rights and managed floating exchange rates D. Special Drawing Rights and adjustable pegged exchange rates

Last Answer : B. Gold and adjustable pegged exchange rates

Description : Which of the following algorithm design technique is used in the quick sort algorithm? a) Dynamic programming b) Backtracking c) Divide-and-conquer d) Greedy method

Last Answer : Which of the following algorithm design technique is used in the quick sort algorithm? a) Dynamic programming b) Backtracking c) Divide-and-conquer d) Greedy method

Description : Which of the following sorting algorithm has the running time that is least dependant on the initial ordering of the input? a) Insertion sort b) Quick sort c) Merge sort d) Selection sort

Last Answer : d) Selection sort

Description : Which of the following sorting algorithm is in-place a) Counting sort b) Radix sort c) Bucket sort d) None

Last Answer : b) Radix sort

Description : Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of assignment operations is minimized in general? a) Insertion sort b) Selection sort c) Heap sort d) None

Last Answer : b) Selection sort

Description : Which of the following algorithm pays the least attention to the ordering of the elements in the input list? a) Insertion sort b) Selection sort c) Quick sort d) None

Last Answer : b) Selection sort

Description : If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance? a) Insertion sort b) Selection sort c) Quick sort d) Merge sort

Last Answer : a) Insertion sort

Description : Which of the following is not an in-place sorting algorithm? a) Selection sort b) Heap sort c) Quick sort d) Merge sort

Last Answer : merge sort

Description : Which of the following is a stable sorting algorithm? a) Merge sort b) Typical in-place quick sort c) Heap sort d) Selection sort

Last Answer : a) Merge sort

Description : Which of the following is not a stable sorting algorithm? a) Insertion sort b) Selection sort c) Bubble sort d) Merge sort

Last Answer : b) Selection sort