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:

Programming using Java Hands On - Control Structures | Celcius to Farenheit Conversion

  Celcius to Farenheit Conversion Write a program to convert  Celsius to Farenheit.  Display the result correct to 1 decimal. Create a class "CelsiusConversion.java" and write the main method. Hint : 5 * (F – 32) = 9 * C,   F-Farenheit , C- Celsius   Sample Input  1 : 80 Sample Output  1 : 176.0 Sample Input  2 : 88 Sample Output  2 : 190.4 Result Description Summary of tests *Note: All the test cases might not have same weightage +------------------------------+ | 7 tests run/ 7 tests passed | +------------------------------+

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...

Programming using Java Running case study - Requirement 1 / 6 | State Board of Cricket Council –V1.0 *

  State Board of Cricket Council –V1.0 * State Board of Cricket Council   State Board of Cricket Council (SBCC) is one of the leading cricket selection academies in the state . They are in need of an automated system that should manipulate the player details provided and also find the players who have secured star rating between a specific range from the database. You being their software consultant have been approached to develop a pilot java application which can be used by the  admin for the above mentioned requirement . UserInterface.java package  com.sbcc.main; import  com.sbcc.model.*; import  java.util.*; import  java.lang.*; import  com.sbcc.skeletonvalidator.SkeletonValidator; public   class   UserInterface  {      public   static   Player   pl ;      public   static   void   main ( String []  args ) {        ...

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>     ...

Software Engineering Concepts Basics Of Testing Basics Of Testing | Quiz 2

Software Engineering Concepts  Basics Of Testing  Basics Of Testing Quiz 2

RDBMS Data Definition Language | Create Buses table

 efer the below schema and create the buses table. Column Name Datatype Size Constraint Constraint name Bus_no Number 11 Primary key PK_BUSES Bus_name Varchar2 20   Type Varchar2 20   Total_seats Number 11   Avail_seats Number 11     Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

UNIX Introduction to Unix | Pre-Quiz

  Feedback Congratulations! You have passed by securing more that 80%. Question  1 Correct Mark 1.00 out of 1.00 Flag question Question text  Solaris is the name of a flavor of UNIX from _____________. Select one: a.  HP  b.  Sun Microsystems   c.  IBM  d.  Digital Equipment Corp Feedback Your answer is correct. The correct answer is: Sun Microsystems Question  2 Correct Mark 1.00 out of 1.00 Flag question Question text Match the following: HP-UX Answer 1 Choose... IBM Redhat Hewlett Packard Sun Microsystem   AIX             Answer 2 Choose... IBM Redhat Hewlett Packard Sun Microsystem   Linux Answer 3 Choose... IBM Redhat Hewlett Packard Sun Microsystem   Solaris Answer 4 Choose... IBM Redhat Hewlett Packard Sun Microsystem   Feedback Your answer is correct. The correct answer is: HP-UX → Hewlett Packard, AIX             → IBM, Linux → Redhat,...

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: ...

Subscribe to Get's Answer by Email