Skip to main content

Accenture TFA MCQ | Part 1

Question 1

Correct
Mark 1.00 out of 1.00
Flag question

Question text

 Identify whether the below statement is True or False: The hierarchy of Reader/Writer class is character-oriented and InputStream/OutputStream class is byte-oriented

Select one:

 

Feedback

Question 2

Correct
Mark 1.00 out of 1.00
Flag question

Question text

While garbage collection the java run time system automatically calls ______________method.

Select one:
 

Feedback

Question 3

Partially correct
Mark 0.67 out of 1.00
Flag question

Question text

Choose all the statement(s) that are valid.

Select one or more:
 
 

Feedback

Question 4

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

Predict the output:

public class Topper
{
public static void check() {
	this.display();
		}
public static void display() {
	System.out.println("Welcome to Java");
		}
public static void main(String args []) {
	check();
	}
}

Select one:
 

Feedback

Question 5

Partially correct
Mark 0.67 out of 1.00
Flag question

Question text

Which of the following are not Java keyword?

Select one or more:
 
 

Feedback

Question 6

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

What will happen if you attempt to compile and run the following code?

Integer i=new Integer(15);
Long l=new Long (10);
System.out.println(i + l);
int check=1;
System.out.println(check + i);

Select one:
 

Feedback

Question 7

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

Predict the output:

class One
{
    void calculate(int a, int b)
    {
        System.out.println("Class One");
    }
}
 
class Two extends One
{
    @Override
    void calculate(int a, int b)
    {
        System.out.println("Class Two");
    }
}
 
class Three extends Two
{
    @Override
    void calculate(int a, int b) 
    {
        System.out.println("Class Three");
    }
}
 
public class Test 
{   
    public static void main(String[] args)
    {
        One one = new Two();
         
        one.calculate(10, 20);
         
        Two two = (Two) one;
         
        two.calculate(50, 100);
         
        Three three = (Three) two;
         
        three.calculate(100, 200);
    }
}

Select one:
 

Feedback

Question 8

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

On exceuting the following code predict the output

public class TestMain {
	public static void main(String args[ ])
	{
	try
	{
	int x=10;
	throw(new Exception("Throw new Exception"));
	}
	catch(Exception e)
	{
	System.out.print("Exception caught in catch block. ");
	return;
	}
	finally
	{
	System.out.println("Exception caught in finally block.");
	}
	}
	}

Select one:
 

Feedback

Question 9

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

String str= new String("Hello World");

Which of the following calls are valid?
(A) str.trim()
(B) str.replace('o', 'A')
(C) str.substring(3)
(D) str.toUppercase()
(E) str.setCharAt(1,'A')
(F) str.append("xyz")

Select one:
 

Feedback

Question 10

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Select the true statement ?

Select one:
 

Feedback

Question 11

Correct
Mark 1.00 out of 1.00
Flag question

Question text

How do we change the state of an object ?

Select one:
 

Feedback

Question 12

Correct
Mark 1.00 out of 1.00
Flag question

Question text

How does the different section of an application communicate in an OO approach ?

Select one:
 

Feedback

Question 13

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Select the principle that best describes the given scenario. An air-condition can be operated using the button or remote control.

Select one:
 

Feedback

Question 14

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Select the benefits of OOP ?

Select one or more:
 
 

Feedback

Question 15

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

Select the multiplicity between passenger and train reservation ticket? What is the multiplicity of passenger ?

Select one:
 

Feedback

Question 16

Correct
Mark 1.00 out of 1.00
Flag question

Question text

The given snippet describes ________________-

    BEGIN
        DECLARE marks[10] 
        DECLARE number
        SET number TO 0
        FOR index=0 TO 9
 INPUT array[index]
        END FOR
        number= marks[0]
        FOR index=0 TO 9
                 IF marks[index] > number THEN
                      number =marks[index]
                 END IF
        END FOR  
        PRINT number
END

Select one:
 

Feedback

Question 17

Correct
Mark 1.00 out of 1.00
Flag question

Question text

_________ is not the exact code for solving the problem but it would give us an idea of how the problem is going to be solved.


Select one:
 

Feedback

Question 18

Correct
Mark 1.00 out of 1.00
Flag question

Question text

SPOT THE ERROR:

Observe the below algorithm to find the average of three numbers. 

Step1: Start

Step2: Get num1, num2, num3

Step3: Add num1, num2, num3 and store it in Sum

Step4: Average=sum%3

Step5: Display Sum and Average

Step6: Stop

Identify the incorrect step(if any)

Select one:
 

Feedback

Question 19

Incorrect
Mark 0.00 out of 1.00
Flag question

Question text

Carefully read the question and answer accordingly. From the list of input elements one element is taken during each iteration to find its corresponding position. This idea of sorting is said to be _______.

Select one:
 

Feedback

Question 20

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Carefully read the question and answer accordingly. Which data structure is said to be linear data structure?

Select one:
 

Feedback

Question 21

Correct
Mark 1.00 out of 1.00
Flag question

Question text

What is the time complexity of below function?

void cal_fun(int m,int a[])

{

int i=0,j=0;

for(;i<m;++i)

       while(j<m && a[i] < a[j])

             j++;

}

Select one:
 

Feedback

Question 22

Correct
Mark 1.00 out of 1.00
Flag question

Question text

From the given options identify the appropriate algorithm that has the lowest worst-case complexity?

Select one:
 

Feedback

Question 23

Correct
Mark 1.00 out of 1.00
Flag question

Question text

Time complexity of an algorithm signifies the total time required by the algorithm to complete its execution with provided resources. State True or False.

Select one:
 

Feedback

Question 24

Correct
Mark 1.00 out of 1.00
Flag question

Question text

State true or false.

 Configuration management is important only during the coding phase

Select one:
 

Feedback

Question 25

Correct
Mark 1.00 out of 1.00
Flag question

Question text

The SRS document should be

Select one:
 

Feedback

Comments

Must Read:

DFA Solutions

  Question  1 Correct Mark 1.00 out of 1.00 Flag question Question text To secure the http messages in the API calls, its necessary to: Select one: a. All the above b. Use cryptography c. implement identity management d. avoid hardcoding any sensitive data in the messages Feedback The correct answer is: All the above Question  2 Correct Mark 1.00 out of 1.00 Remove flag Question text A team has completed 10 Sprints and moving to the 11th Sprint. Till Sprint 10, the team has achieved an average of 50 story points per sprint. The same is projected as their velocity for the upcoming sprints with the Client. What is this approach called? Select one: a. Velocity Driven Sprint Planning b. Velocity Driven Commitment c. Commitment Driven Velocity d. Commitment Driven Sprint Planning Feedback The correct answer is: Velocity Driven Sprint Planning Question  3 Incorrect Mark 0.00 out of 1.00 Remove flag Question text Jack is grooming himself to be a potential Product Owner. Kno...

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD for Persons

  Generate XSD for Persons Generate XSD for the following XML. XYZ organization wants to store the details of persons in an xml file. The following scenario helps in designing the XML document. Here PersonList  is the root tag. PersonList contains the entry of each person with adhaarno, name, age and address. <?xml version="1.0"  encoding="UTF-8"?> <PersonList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PersonList.xsd">     <Person>         <adhaarno>414356782345</adhaarno>         <name>             <firstname>Zeenath</firstname>         </name>         <age>28</age>         <address>             <doorno...

Accenture TFA MCQ | Part 2

  Question  26 Incorrect Mark 0.00 out of 1.00 Flag question Question text Go-Will department store wants to automate few of its functionalities.From the below options identify the functional requirements of Go-Will department store Select one or more: a.  Generate Bill for the purchased Items   b.  Add Product Details   c.  System should be up and running 24/7   d.  Response for each button click should be within 3 seconds   Feedback The correct answers are: Generate Bill for the purchased Items, Add Product Details Question  27 Incorrect Mark 0.00 out of 1.00 Flag question Question text A website for Flight Booking was developed and given to the testing team for testing. It has various fields to enter the data, out of which one of the input field will take the birth year from the user ranging from 1980 to 2060. The boundary values for testing this field are? Select one: a.  1959, 1960, 1994, 1995 b.  0, 1959, 1960, 1961,...

Unbounded Knapsack

1. You are given a number n, representing the count of items. 2. You are given n numbers, representing the values of n items. 3. You are given n numbers, representing the weights of n items. 3. You are given a number "cap", which is the capacity of a bag you've. 4. You are required to calculate and print the maximum value that can be created in the bag without      overflowing it's capacity. Note: Each item can be taken any number of times. You are allowed to put the same item again                    and again. Input Format A number n v1 v2 .. n number of elements w1 w2 .. n number of elements A number cap Output Format A number representing the maximum value that can be created in the bag without overflowing it's capacity Constraints 1 <= n <= 20 0 <= v1, v2, .. n elements <= 50 0 < w1, w2, .. n elements <= 10 0 < cap <= 10 Sample Input 5 15 14 10 45 30 2 5 1 3 4 7 Sample Output 100 Solution: im...

Accenture TFA Quiz | Part 2

  Question  26 Correct Marked out of 1 Flag question Question text What will be the output of the following Java code? public class ApplicationTester { public static void main(String[] args) { int[] array = {11,22,33,44,55,11}; int searchNumber = 11, position=999; for(int index=0; index < array.length; index++) { if(searchNumber == array[index]) { position = index; } } System.out.println(position); } } Choose the most appropriate option. Select one: a.  0 b.  5   c.  1 d.  6 Feedback The correct answer is: 5 Question  27 Incorrect Marked out of 1 Flag question Question text Predict the line of code Abstract class Base1 { protected void getDetails() { System.out.println("Base method"); } public Abstract void demomethod(); } Abstract class Base2 extends Base1 { public Abstract void samplemethod(); } class Derived extends Base2 { //Line1 } Select one: ...

Knights Tour

1. You are given a number n, the size of a chess board. 2. You are given a row and a column, as a starting point for a knight piece. 3. You are required to generate the all moves of a knight starting in (row, col) such that knight visits       all cells of the board exactly once. 4. Complete the body of printKnightsTour function - without changing signature - to calculate and       print all configurations of the chess board representing the route      of knight through the chess board. Use sample input and output to get more idea. Note -> When moving from (r, c) to the possible 8 options give first precedence to (r - 2, c + 1) and                 move in clockwise manner to                explore other options. Input Format A number n A number row A number col Output Format All configurations of the chess board representing route of knights thro...

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD for Students

  Generate XSD for Students   Generate XSD for the following XML. XYZ School wants to store the details of students in an xml file. The following scenario helps in designing the XML document. Here StudentList  is the root tag. StudentList contains the entry of each student with rollno, name, age, address and department. <?xml version="1.0" encoding="UTF-8"?> <StudentList  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="StudentList.xsd">     <Student rollno="2017CSE0055">         <name>             <firstname>Savitha</firstname>         </name>         <age>20</age>         <address>             <doorno>35</doorno>     ...

Zig Zag Pattern

  /* @ToDo     Zig Zag Pattern         *               *                *       *       *       *        *               *               *        */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen (...

Subscribe to Get's Answer by Email