Skip to main content

Accenture TFA Quiz | Part 1

 

Question 1

Correct
Marked out of 1
Flag question

Question text

The employee table contains EmployeeNumber, EmployeeName, Salary and DeptCode Columns. Which is the CORRECT SQL query to display DeptCode and average salary of each department? Choose most appropriate option.

Select one:
 

Feedback

Question 2

Correct
Marked out of 1
Flag question

Question text

Which is the CORRECT SQL Query to display names of employees which has only 3 letters that starts with 'A' and ends with 'e'? Choose most appropriate option.

Select one:
 

Feedback

Question 3

Correct
Marked out of 1
Flag question

Question text

Consider the table Student(StudentId, StudentName, Email, PercentageOfMarks). Which is the CORRECT query to display the details in the ascending order (lowest to highest) of PercentageOfMarks and in the descending order of StudentId in case PercentageOfMarks is the same. Choose most appropriate option

Select one:
 

Feedback

Question 4

Incorrect
Marked out of 1
Flag question

Question text

Which of the following statement(s) is/are TRUE?
(i) In a non-correlated(independent) subquery, the subquery is always executed only once.
(ii) In a non-correlated(independent) subquery, the inner query (sub query) references the column from the outer query (main query).
Choose most appropriate option

Select one:
 

Feedback

Question 5

Correct
Marked out of 1
Flag question

Question text

Which of the following is CORRECT about DELETE command?
a) It can delete single or multiple columns from a table
b) It can delete single or multiple records from a table
c) Records deleted can be roll backed.
Choose most appropriate option.

Select one:
 

Feedback

Question 6

Incorrect
Marked out of 1
Flag question

Question text

Which of the following about DELETE command in SQL is FALSE? Choose most appropriate option.

Select one:
 

Feedback

Question 7

Correct
Marked out of 1
Flag question

Question text

Identify the CORRECT SQL statement to create a table with composite primary key. Choose most appropriate option.

Select one:
 

Feedback

Question 8

Incorrect
Marked out of 1
Flag question

Question text

Which of the following can be created as a table level constraint?
(i) primary Key
(ii) foreign key
(iii) unique
Choose most appropriate option.

Select one:
 

Feedback

Question 9

Correct
Marked out of 1
Flag question

Question text

State True/False?

The names of the foreign key field and the referenced field(in parent table) may be same or different, but must have the same data type.

Select one:
 

Feedback

Question 10

Correct
Marked out of 1
Flag question

Question text

Which of the following statement(s) is/are TRUE?


(i) In a subquery, the inner query is responsible for giving result.


(ii) In a subquery, the outer query is responsible to display output.


Choose most appropriate option

Select one:
 

Feedback

Question 11

Correct
Marked out of 1
Flag question

Question text

Which of the following SQL commands is used to remove table "EMPLOYEE" present in the database? Choose most appropriate option.

Select one:
 

Feedback

Question 12

Correct
Marked out of 1
Flag question

Question text

Assume that table Project is created using the DDL statement given below and has no records. 

                   CREATE TABLE Project( projectId VARCHAR2(4) CONSTRAINT proj_pk PRIMARY KEY, projectName VARCHAR2(10) DEFAULT 'NA' CONSTRAINT proj_nn NOT NULL); 

Identify the INSERT statements which would successfully insert record into Project table. Choose two most appropriate options.

Select one or more:
 
 
 

Feedback

Question 13

Incorrect
Marked out of 1
Flag question

Question text

Consider table Customer(cid NUMBER(4), cname VARCHAR2(10) ) is created in the database and has no records. Refer to the below statements.  
 COMMIT; 
INSERT INTO Customer VALUES(101,’John’); 
INSERT INTO Customer VALUES(102,’James’); 
DELETE FROM Customer WHERE cid=101; 
INSERT INTO Customer VALUES(103,’Mark’); 
ROLLBACK; 
COMMIT;   
How many records will be available in the customer table if the above statements are executed in sequential order.   Choose the most appropriate option.
Select one:
 

Feedback

Question 14

Correct
Marked out of 1
Flag question

Question text

Assume that table Asset(assetId number(2)) is created and 2 records are already inserted and saved.

COMMIT;
DELETE FROM ASSET;
ROLLBACK;
INSERT INTO ASSET VALUES(5);
COMMIT;

What would be the output of the below SQL statement after executing the above statements sequentially.

SELECT COUNT(*) FROM Asset;
Select one:
 

Feedback

Question 15

Incorrect
Marked out of 1
Flag question

Question text

Consider the following tables:
Vendor (VendorId, VendorName, PhoneNumber). Here VendorId is the primary key.
Item (ItemCode, UnitPrice, QuantityOnHand, VendorId) Here ItemCode is the primary key and VendorId is the foreign key referencing the VendorId in Vendor Table.
 
Which is the CORRECT SQL query to display ItemCode, UnitPrice, VendorName for all Items. It should also display the details of the Item which is not having any vendor?
Choose most appropriate option
Select one:
 

Feedback

Question 16

Incorrect
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)
   { 
     String s1 = "One"; 
     String s2 = "One";
     System.out.println((s1==s2) + " " + s1.equals(s2)); 
   } 
 }
Choose the most appropriate option.

Select one:
 

Feedback

Question 17

Correct
Marked out of 1
Flag question

Question text

Which of the following statement/s is/are TRUE?
(1) Abstract method can have body
(2) Abstract class cannot be instantiated
(3) Abstract class can have constructor
Choose the most appropriate option.

Select one:
 

Feedback

Question 18

Correct
Marked out of 1
Flag question

Question text

What will be the output of the following Java code?

 public class Rectangle 
{ 
  private int length; 
  private int width; 
  public static void main(String[] args) 
  { 
    Rectangle rectangle1 = new Rectangle(); 
    rectangle1.length=10; 
    rectangle1.width=5; 
    Rectangle rectangle2 = rectangle1; 
    System.out.println("Length : "+rectangle2.length); 
    System.out.println("Width : "+rectangle2.width);
  } 
}
Choose the most appropriate option.

Select one:
 

Feedback

Question 19

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 i=10; 
    while(++i<15)
    { 
      System.out.print(i + " "); 
    } 
  }
}
Choose the most appropriate option.

Select one:
 

Feedback

Question 20

Correct
Marked out of 1
Flag question

Question text

What will be the output of the following Java code?

class StringSample 
{ 
  public StringSample(String string) 
  { 
    System.out.println("The string is " + string); 
  } 
} 
public class ConstructorTester1 
{ 
  public static void main(String[] args) 
  { 
    StringSample stringSample = new StringSample(); 
    StringSample stringSample1 = new StringSample("Test String"); 
  } 
}
Choose the most appropriate option.

Select one:
 

Feedback

Question 21

Incorrect
Marked out of 1
Flag question

Question text

What will be the output of the following Java code?

public class StringTester 
{ 
public static void main(String[] args) 
{ 
  String player1 = new String ("virat kohli"); 
  String player2 = new String("GAYLE"); 
  player1.toUpperCase(); 
  String newPlayer=player1.substring(6); 
  newPlayer = newPlayer + player2.toLowerCase(); 
  System.out.println(newPlayer); 
} 
}
Choose the most appropriate option.

Select one:
 

Feedback

Question 22

Correct
Marked out of 1
Flag question

Question text

Consider the Java code given below. How many times "1" will be printed when the code is executed?

 public class ApplicationTester 
{ 
  public static void main(String[] args)
  { 
    int i = -1; 
    while( ++i <= 1)
    { 
      System.out.println("1");
      i++; 
    } 
  }
}
Choose the most appropriate option.

Select one:
 

Feedback

Question 23

Correct
Marked out of 1
Flag question

Question text

What will be the output of the following Java code?

 class Event
{ 
  static int eventId; 
  public static void main(String[] args) 
  { 
    Event e1=new Event(); 
    e1.eventId=100; 
    Event e2=e1; e2.eventId=200;
    Event e3=new Event(); 
    System.out.println(e1.eventId+ " "+ e2.eventId + " "+ e3.eventId); 
  } 
}
Choose the most appropriate option.

Select one:
 

Feedback

Question 24

Correct
Marked out of 1
Flag question

Question text

What will be the output of the following code:

public class Test 
 { 
   public static void main(String[] args)
   { 
     int number=20; 
     switch(number)
     { 
       case 10: System.out.println("10");
         break;
       case 20: System.out.println("20"); 
       case 30: System.out.println("30");
         break; 
       default:System.out.println("Not in 10, 20 or 30");
     } 
   } 
 }
Choose most appropriate option.

Select one:
 

Feedback

Question 25

Incorrect
Marked out of 1
Flag question

Question text

What will be the output of the following Java code?

public class IfTester
{ 
  public static void main(String[] args)
  { 
    int number1 = 10, number2; 
    if(number1 == 10) 
    {
      number2 = 20; 
    }
    if (number1 != 10) 
    { 
      number2 = 30; 
    } 
    System.out.println("Number2 :"+number2); 
  }
}
Choose the most appropriate option.

Select one:
 

Feedback

Comments

Must Read:

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

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

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

Climb Stairs With Variable Jumps

 1. You are given a number n, representing the number of stairs in a staircase. 2. You are on the 0th step and are required to climb to the top. 3. You are given n numbers, where ith element's value represents - till how far from the step you       could jump to in a single move.        You can of course jump fewer number of steps in the move. 4. You are required to print the number of different paths via which you can climb to the top. Input Format A number n .. n more elements Output Format A number representing the number of ways to climb the stairs from 0 to top. Constraints 0 <= n <= 20 0 <= n1, n2, .. <= 20 Sample Input 10 3 3 0 2 1 2 4 2 0 0 Sample Output 5 Solution: import java.io.*; import java.util.*; public class Main {     public static void main(String[] args) throws Exception {         // write your code here         Scanner sc = new Scanner(System.in);   ...

Zero One Knapsack | Recursion

 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 0 or 1 number of times. You are not 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 75 Solution: import java.io.*; import java.util.*; public class Main...

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

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

Subscribe to Get's Answer by Email