Accenture TFA MCQ Questions Answer
Accenture TFA MCQ Questions Answer
Public class TestMain{
Public static void main(String[] args)
{ TreeSet<String> tList = new
TreeSet<String>(); TreeSet<String> sList = new
TreeSet<String>(); tList.add(“One”);
tList.add(“Two”);
tList.add(“Three”);
tList.add(“Four”);
tList.add(“Five”);
sList=(TreeSet)tList.subSet(“One”,true,”Six”,true);
tList.add(“One”);
tList.pollFirst();
tList.pollFirst();
tList.add(“Two”);
System.out.println(tList.size()+””+sList.size());
- a.31
- b.53
- c.50
- d.30
- e.41
A sequence diagram can represent object interactions
arranged in a time sequence. IT will
represent only a sequence of the flow but aspects like
branching , looping cannot be
represented in the sequence diagram
Answer:
False
3. Predict the output
Import java.util.List;
Public class TestUserMain{
Public static void main(string[] args)
{ List<Number>|1= new
ArrayList<Number>(); |1.add(5);
|1.add(5);
System.out.println(sum(|
1)); }
Public static double sum(List<Number>|){
Double sum=0;
For(number i=l)
Sum +=i.doubleValue();
Return sum;
}
- -10
- 10
- Compile time error
- Run time Exception
4. Which is not part of HTML5 API
- HTML Geolocation
- HTML application cache
- HTML Drag and Drop
- HTML Geography
5. Predict the output
Import java.util.TreeMap;
Public class TestUserMain{
Public static void main(String[] args)
{ Map<String,String> m1=new
TreeMap<String,String>(); M1.PUT(“null”,null);
M1.put(null,”Raju”);
System.out.println(m1);
}
- {null=null}
- {null=Raju}
- {null=null, null=Raju}
- Compile time error
- Run time Exception
6. Carefully read the question and answer accordingly. In
a linear search algorithm, if an item to be searched is found in the middle of
an array then it is said to be ________.
- Best case
- Worst case
- Average case
- Null case
7. A Professor class uses the Schedule class to display
the scheduled classes of the professor for a week. What will be the
relationship between the professor and the schedule class?
- Inheritance
- Aggregation
- Composition
- Dependency
8. Carefully read the question and answer accordingly. To
execute the result of the last executed procedure call recursive procedures use
stacks. State True or False.
Answer:
True
9. Software which controls radiation equipment for
patients is best shut down, if it receives bad input for a radiation dosage.
This is best example for_______.
- Correctness
- Robustness
- Verification
- Validation
10. Choose the appropriate option where prototype model is
used
- For Projects where requirements are very clear
- For projects where requirements are unclear
- Projects where lot of risk factors needs to be com
- Projects with frequent changes
11. If you are asked to do a molecular software design,
which combination of coupling and cohesion should you use for designing the
software?
- High cohesion and high coupling
- High cohesion and low coupling
- Low cohesion and High coupling
- Low cohesion and low coupling
12. The element to specify a list of predefined options
for input controls is Choose one:
- <datalist>
- <source>
- <embed>
- <track>
13. O( nlogn) is the best case time complexity of Bubble
Sort. State True or False.
Answer:
False
14. In many situations .it would be necessary to make a
decision before arriving at a conclusion or to go to the next step of
processing. Which of the following suits the given description?
- Conditional statement
- All of the above
- Iterative statement
- Sequential statement
15. Predict the output
Step1: Start the Program
Step2: Declare a variable count and set the count as 1
Step3: Print the count
Step4: Increment the count by 1
Step5: Check whether count is greater than or equal to1.If
yes go to step 3.If no go to step
6
Step6: Print the count
Step7: Stop
- 1 1
- 1 2
- 2 1
- Loop runs inde
16. Ram is a Developer. he receives a defect list from the
testing team for the code which he developed. He fixes the defects and assigns
it back to the test manager/tester. What should be the status of the defect
now?
- Open
- Fixed
- Closed
- New
17. Manual execution of steps in an algorithm is called as
______.
- Dry run
- Flowchart
- Quick run
- Pseudocode
18. Unix executables are stored in which path?
- /dev
- /bin
- /usr
- /tmp
19. Which of these is used to prevent the error:
‘ORA-00937:not a single-group function’?
- Use Group by clause
- Use Where Cause
- Use Order by clause
- Use having clause
20. A system administrator needs to identify different
types of files in the UNIX system. Help him by matching the correct symbols
used to identify the file type. 1)-2)|3)b4)c With A) RegularFile B) LinkFile C)
BlockDeviceFile D) CharacterDeviceFile
- 1-A,2-B,3-C,4-D
- 1-D,2-A,3-B,4-C
- 1-D,2-B,3-C,4-A
- 1-D,2-C,3-B,4-A