DXC Technology Computer Fundamentals Previous Year Questions

04 January 2023

DXC Technology Computer Fundamentals Previous Year Questions

DXC Technology Computer Programming Questions

Q1) Tower of Hanoi is an application of--------

A. Stacks

B. Linked Lists

C. Queue

D. Dequeues
Answer : Option A


Q2) Deadlocks can be described more precisely in terms of a directed graph called a system resource allocation graph, What can be conduced in the two statements stated below are true for a system.

1. The graph contains a cycle.

2. The cycle involves only a set of resource types each of which has only a single instance.

A. A deadlock will occur

B. A deadlock will never occur

C. The statement contradicts each other

D. A deadlock may exist
Answer : Option D


Q3) Yukta created an interface to use it in different parts of the program by implementing it. But she forgot to specify the access specified for each contained method. What will be the access specified of the methods that will be inherited/implemented?

A. Protected 

B. Public

C. Private 

D. An error will be generated 
Answer : Option B


Q4) What is the value of 10101B in decimal number system?

A. 21

B. 42

C. 16

D. 20
Answer : Option A


Q5) Function main is the starting point of execution of a program. Which of the following options shall help in making an executable program without the use of main function in the program?

A. It is not possible to run a program without a main function in a program

B. Any program without a main function shall not do anything but can only produce a blank screen

C. Two macros can be used. One to hold the name of a function and its working and the other to call the first macro

D. Any function can be made and marked as starting point using a language dependent syntax
Answer : Option B


Q6) How many nodes does a full binary tree with “n” leaves contain?

A. 2n+1 nodes

B. log2n nodes

C. 2n—1 nodes

D. 2n nodes

Answer : Option 


Q7) Which members of a class cannot be inherited?

A. Public

B. Private

C. Private and Protected

D. Protected

Answer : Option 


Q8) A librarian has to rearrange the library books on  a shelf in a proper order at the end of each day. Which sorting technique should be the librarian’s ideal choice?

A.Bubble sort

B.Insertion sort

C.Selection sort

D.Heap sort

Answer : Option 


Q9) A programmer tries to debug a code of 10,000 lines. It is known  that there is a logical error in the first 25 lines of the code.

 What is the efficient way to debug the code?

A. Compile the entire code and check it line by line

B. Use an interpreter on the first 25 lines of code

C. Compile the entire code and run it

D. None of the above can be used to debug  the code

Answer : Option 


Q10) What is the output of the pseudocode statements given below?

(Note: Assume that when two data types are processed through an operator, the answer maintains the same data type as that of the input. Also, all data types have enough range to accommodate any number. If two different data types are operated upon, the result assumes the data type that is more expressive.)

integer a = 984, b=10

//float is a data type to store real numbers.

float c

c = a/b

print c





Answer : Option 


Q11) A language has 28 different letters in total. Each word in the language consists of a maximum of 7 letters. A programmer wants to create a data type to store a word of this language. She decides to store the word as an array of letters. How many bits should she assign to the data type to store all kinds of words of the language?





Answer : Option 


Q12) X and Y are asked to write a program to sum the rows of a 2X2 matrix stored in an array A.

X writes the code (Code A) as follows:

for n= 0 to 1



Y writes the code (Code B) as follows:

sumRow1[0] =A[0][0] + A[0][1]

sumRow1[1] =A[1][0] + A[1][1]

Which of the following statements is correct about these codes if no loop unrolling is done by the compiler?

A.Code A would execute faster the Code B

B.Code B would execute faster than Code A

C.Code B is logically incorrect

D.Code A is logically incorrect

Answer : Option 


Q13) integer i=1 // Statement 1

while (i<= 3)


int j // Statement 2

while (j<=1) // Statement 3


Print j

print blank space

j=j+1 // Statement 4


print end-of-line //takes the cursor to the next line



Answer : Option 


Q14) A programmer writes the given program to print thee following  pattern  on thee screen


1 2

1 2 3

Will  this program function properly?  If not, which statement should be modified?

A.Statement 1

B.Statement 2

C.Statement 3

D.Statement 4

E.This program will function properly.

Answer : Option 


Q15) For Which of the given options is the stack implementation useful?

A.Radix search

B.Breath first search


D.None of the above

Answer : Option 

Related Articles

Ask Us Anything !