Sie sind auf Seite 1von 73

1. When and where was TCS founded? A. 1954, Mumbai B. 1968, Jamshedpur C. 1968, Mumbai D.

1954, Coimbatore Answer Key: C

2. To how many industries does TCS provides its consultancy? A. 20 B. 12 C. 10 D. 15 Answer Key: B

3.What are the values of TCS? A. Leading Change, Integrity, Respect for individual, Excellence, Learning and Sharing B. Leading innovation, Integrity, Respect for the colleagues, Excellence, Mentoring and Sharing C. Leading Change, Integrity, Responsibility, Excellence, Learning and propelling

D. Leading innovation, Integrity, Courteous, Certainty, Learning and Sharing Answer Key: A

4.What is the name of the first research center established by TCS? A. Tata Institute of Social Sciences (TISS) B. Tata Institute of Fundamental Research (TIFR) C. Tata Research Development and Design Center (TRDDC) D. Indian Institute of Science (IISc) Answer Key: C 5.What was TCSs first onsite project? A. Automating Johannesburg Stock Exchange B. Burroughs (the first business computer manufacturer)

C. Developing electronic depository, SECOM for SIS SegaInterSettle, Switzerland D. Institutional Group and Information Company (IGIC) Answer Key: D 6.TCS is .. largest IT firm in the world? A. 4th B. 6th C. 2nd D. 8th Answer Key: D 7.Who is TCS first General Manager? A. Ratan Tata B. JRD Tata C. S. Ramadorai D. F.C Kohli Answer Key: D

8.TCS provides six major IT services A. Custom Application Development, Application Management, Migration and Re-engineering, System Integration, Testing, Performance Engineering

B. Customer Development, Application Management, Migration and Re-engineering, Business Management, Testing, Performance Engineering C. Custom Application Development, Application Management, Migration and Re-engineering, Business Management, Testing, Performance Engineering D. Customer Development, Application Management, Migration and Re-engineering, System Integration, Testing, Performance Engineering Answer Key: C

9.Which model does TCS follow? A. Global Integrated Delivery Model B. Global Network Delivery Model C. World Integrated Delivery Model D. World Network Delivery Model Answer Key: B

10.Tata Consulting Services goes public in Indias private sectors largest initial public offer in A. 2002 B. 1999 C. 2006 D. 2004 Answer Key: D Basic Programming

Question 1 of 10 10.0 Points What is a variable in a computer program? A. An input argument B. A value such as 5

C. The name given to a value D. An output Answer Key: C Feedback: When you are writing a computer program, you will often want the program to be able to "remember"

a value. You can do this by assigning the important value to a named variable. Variables are categorized by the types of data they store. Question 2 of 10 10.0 Points What is a semantic error ?

A. A program error that gives wrong output B. A program error that is not so important to take care C. A program error that crashes the program D. A program error that is difficult to debug Answer Key: A Feedback: If there is a semantic error in your program, it will run successfully, in the sense that the computer will not generate any error messages, but it will not do the right thing. It will do something else. Specifically, it will do what you told it to do. Question 3 of 10 10.0 Points A variable will last until

A. the value of the variable is used in the program

B. The program completes and exit C. Computer is switched off D. Hard disc is formatted Answer Key: B Feedback: The lifetime of a variable in the computer memory will be same as the life of the program. The memory is cleaned as soon as the program stops. Question 4 of 10 10.0 Points In a Javascript program, the word preceding the . represents A. A command

B. An object C. An action by an object

D. A program name Answer Key: B Feedback: For eg.Zygot.move(). Here Zygot is the object and move is the action requested on that object Question 5 of 10 10.0 Points What do you mean by a portable computer program? A. The program is very small B. The program can be attached to the port of a computer C. It can be send from one computer to another computer

D. It can be run on computers with different types of computers Answer Key: D Feedback: Portability is a characteristic attributed to a computer program if it can be used in an operating systems other than the one in which it was created without requiring major rework. Porting is the task of doing any work necessary to make the computer program run in the

new environment. Question 6 of 10 10.0 Points A compiler will A. Link different programs written in same language together B. Interpret the program line by line

C. Compile the program to create an executable D. Correct the errors in the program Answer Key: C Feedback: A compiler is a computer program (or set of programs) that transforms source codewritten in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. Question 7 of 10 10.0 Points What do we mean by the performance of a program ?

A. The number of arguments that a program can handle B. The speed with which a program runs

C. The utilization of resources such as CPU and memory by a program D. The number of times a program can be run Answer Key: C Feedback: Computer performance is characterized by the amount of useful work accomplished by a computer system compared to the time and resources used. Question 8 of 10 10.0 Points What is debugging ? A. The process of removing the identified bugs B. Testing the program to identify defects C. Fine tuning the program for performance

D. The process of tracking and correcting the bugs in a program Answer Key: D Feedback: Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program Question 9 of 10 10.0 Points Data structure enables A. Structuring data in a program

B. Storing and organizing data in computer memory for efficient use C. Analysis of the data used in a program D. Connecting a program with database Answer Key: B Feedback: Data structures are generally based on the ability of a computer to fetch and store data at any place

in its memory, specified by an addressa bit string that can be itself stored in memory and manipulated by the program. Question 10 of 10 10.0 Points What is class in object oriented program ? A. A collection of objects B. Category /Type of a program

C. A template to create objects D. A variable type in a program Answer Key: C Feedback: In the real world, you'll often find many individual objects all of the same kind. There may be thousands of other bicycles in existence, all of the same make and model. Each bicycle was built from the same set of blueprints and therefore contains the same components. In object-oriented terms, we say that your bicycle is an instance of the class of objects known as

bicycles. A class is the blueprint from which individual objects are created

. Answere of DBMS Question 1 of 10 10.0 Points Which of the following options list the steps to convert a table to its second normal form? A. Group the removed items in the another table. ... B. Find and remove fields that are related to the only part of the key. C. All of the above D. Assign the new table with the key i.e. part of the whole composite key. Answer Key: C

Question 2 of 10 10.0 Points In which of the following ways does TRUNCATE TABLE differ from DELETE? A. The number of deleted rows are not returned. B. Truncate operations drop and re-create the table which is much faster than deleting rows. one by one. C. Truncate operations are not transaction safe. D. All of the above Answer Key: D Question 3 of 10 10.0 Points Following tasks can be performed when using the ALTER TABLE clause: 1.Change the name of the table 2.Change the name of the column 3.Decrease the size of a column if table data exists. True False

Answer Key: False Feedback: False ( all above tasks can not be performed ) Question 4 of 10 10.0 Points Sometimes tables within particular database become obsolete and ought to be discarded. Which of the following commands would you use for the same? A. REMOVE TABLE < TABLE NAME> B. DROP TABLE < TABLE NAME > C. DELETE TABLE < TABLE NAME > D. None of the above Answer Key: B Question 5 of 10 10.0 Points A foreign key must have a corresponding primary key or unique key value in the master table. True False

Answer Key: True Question 6 of 10 10.0 Points NULL value is equivalent to a value of Zero if the data type is number True False Answer Key: False Question 7 of 10 10.0 Points Integrity constraint can be dropped if the rule that it enforces is not longer TRUE or if the constraint is no longer needed. True False Answer Key: True Question 8 of 10 10.0 Points SELECT TRIM(' Hansel ' ) Trim both sides FROM DUAL What would be the output of the above command?

A. None of the above B. Trim both sides C. Hansel D. Trim both sides Hansel Answer Key: D Question 9 of 10 10.0 Points What would be the output of following command. SELECT TRANSLATE('1sct523','123', '7a9') Change FROM DUAL; A. None of the above B. 7 sct C. Change 7 sct 5a9 D. 7sct 5a9

Answer Key: C Question 10 of 10 10.0 Points What is joining a Table to itself called? A. Left inner join B. Outer join C. Inner join D. Self Join Answer Key: D

S/E Software Engineering - Quiz1 Return to Assessment List Part 1 of 1 - 100.0 Points Question 1 of 10 10.0 Points

Requirements can be classified in to two types, namely, functional requirements and non-functional requirements CorrectIncorrect Incorrect True False Answer Key: True Question 2 of 10 10.0 Points Some examples of non-functional requirements are. 1.Number of significant digits to which accuracy should be maintained in all numerical calculations is 10 2.The response time of the system should always be less than 5 seconds 3.The software should be developed using C language on a UNIX based system 4.The matrix diagonalisation routine should zero out all off-diagonal elements, which are equal to or less than 103 5.Experienced officers should be able to use all the system functions after a total training of two hours. After this training, the average number of errors made by

experienced officers should not exceed two per day. CorrectIncorrect Incorrect True False Answer Key: True Question 3 of 10 10.0 Points Every software system has the following essential characteristics: A. It has a boundary. The boundary separates what is with in system scope and what is outside. B. These processes operate on data by creating, modifying, destroying, and querying it. C. It has processes which collaborate with each other to generate the outputs. D. It takes inputs from external agents and generates outputs.

E. The system may also use data stores to store data which has a life beyond the system. Correct F. All the above Answer Key: F Question 4 of 10 10.0 Points ERD complements DFD. While DFD focuses on data and the relationships between them, ERD focuses on processes and data flow between them Incorrect CorrectIncorrect True False Answer Key: False Question 5 of 10 10.0 Points Polymorphism: - It is the means by which an operation behaves differently in different contexts. CorrectIncorrect Incorrect True

False Answer Key: True Question 6 of 10 10.0 Points Encapsulation: This helps in controlling the visibility of internal details of the objects. It improves security and integrity of data CorrectIncorrect Incorrect True False Answer Key: True Question 7 of 10 10.0 Points There are 4 types of Abstraction, namely Entity, Action, Virtual machine & Coincidental. CorrectIncorrect Incorrect True False Answer Key: True

Question 8 of 10 10.0 Points There can be more than one hash fields on a file. Incorrect CorrectIncorrect True False Answer Key: False Question 9 of 10 10.0 Points Concurrency refers to multiple transactions accessing the same database at the same time. In a system which allows concurrency, some kind of control mechanism has to be in place to ensure that concurrent transactions do not interfere with each other. CorrectIncorrect Incorrect True False Answer Key: True Question 10 of 10 10.0 Points Software genetic development process contains three

genetic phrases namely A. Software engineering, Definition, Coding Correct B. Definition, development, maintenance C. Coding, design, Software engineering D. Development, Definition, Testing E. Design, Coding, Development Answer Key: B Body Languagee Question 1 of 20 10.0 Points What does this Body language symbolize? [sorry this picture cant be uploaded] A. Questioning B. Anger C. Intuitive

D. Insulting E. Irritated Answer Key: A Feedback: Questioning Question 2 of 20 10.0 Points Choose the right phrase of the word. I'll be with you in ___________ A. A quarter of an hour. B. A quarter of hour. C. A quarter of one hour. D. One quarter of an hour. Answer Key: A Feedback: A quarter of an hour.

Question 3 of 20 10.0 Points Choose the right vocabulary which matches its meaning. "Expressing one self readily, clearly, effectively" A. Understanding B. Comprehensive C. Eloquence D. Effective Answer Key: C Feedback: Eloquence Question 4 of 20 10.0 Points Select the right option which indicates MTI ( Mother tongue influence) in the below given statement. What is your good name? A. Name B. Your

C. Your good D. Good name Answer Key: D Feedback: Good name Question 5 of 20 10.0 Points Identify the tense used in the following sentence: We built a tree house last week. A. Simple Past B. Present continuous C. Present Perfect D. Past Perfect Answer Key: A Feedback: Simple Past Question 6 of 20 10.0 Points

Pick the correct option(past progressive tense): While Aaron_________ in his room, his friends________ in the pool. A. is working........................are swimming B. was working..................was swimming C. was working........................are swimming D. was working..................were swimming Answer Key: D Feedback: was working..................were swimming Question 7 of 20 10.0 Points Choose the correct verb form to complete the sentence. I ______ on my sofa all day yesterday. A. laid B. lie

C. lying D. lay Answer Key: D Feedback: lay Question 8 of 20 10.0 Points Identify the incorrect part of the sentence: She don't understand / didn't understands / didn't understand/didn't understanding the question yesterday. A. didn't understanding B. don't understand C. didn't understand D. didn't understands Answer Key: C Feedback: didn't understand

Question 9 of 20 10.0 Points Please rewrite the following statement: We are simply loving it here. A. We simply love it here. B. We are simply here. C. We are simply loving. D. We love it here. Answer Key: A Feedback: We simply love it here. Question 10 of 20 10.0 Points What is the right response for the phrase How do you do? A. I am fine,how about you? B. I am fine thank you

C. I am not fine, by the way how are you? D. How do you do? Answer Key: D Feedback: How do you do? Question 11 of 20 10.0 Points Arrange the following sections of a presentation in the correct order: a. overview b. introduction c. start new section d. analyse a point e. give examples f. finish section g. paraphrase and clarify h. summarize and conclude i. inviting audience to ask questions/ discuss A. b,a,c,d,e,f,h,g,i

B. a,d,b,c,e,f,h,g,i C. a,b,c,d,e,f,g,h,i D. a,b,d,c,e,f,h,g,i Answer Key: A Question 12 of 20 10.0 Points In the business arena: A. It is not necessary for men or women to stand for handshaking and all introductions B. Only women should stand for handshaking and all introductions C. Both men and women should stand for handshaking and all introductions D. Only men should stand for handshaking and all introductions Answer Key: C

Question 13 of 20 10.0 Points Fill in the blanks with appropriate articles: At ____ (1) beginning of ____(2) twentieth century, East Los Angeles became ____(3) popular immigrant destination. A. the,the,the B. the,the,a C. the,a,the D. the,an,a Answer Key: B Question 14 of 20 10.0 Points State whether this is true or false: Every presentation has its own target audience.

True

False Answer Key: True Question 15 of 20 10.0 Points Read the passage and answer the following: FINDING A JOB Not so long ago almost any student who successfully completed a university degree or diploma course could find a good career quite easily. Companies toured the academic institutions, competing with each other to recruit graduates. However, those days are gone, even in Hong Kong, and nowadays graduates often face strong competition in the search for jobs. Most careers organizations highlight three stages for graduates to follow in the process of securing a suitable career: recognizing abilities, matching these to available vacancies and presenting them well to prospective employers. Job seekers have to make a careful assessment of their own abilities. One area of assessment should be of their academic qualifications, which would include special skills within their subject area. Graduates should also

consider their own personal values and attitudes, or the relative importance to themselves of such matters as money, security, leadership and caring for others. An honest assessment of personal interests and abilities such as creative or scientific skills, or skills acquired from work experience, should also be given careful thought. The second stage is to study the opportunities available for employment and to think about how the general employment situation is likely to develop in the future. To do this, graduates can study job vacancies and information in newspapers or they can visit a careers office, write to possible employers for information or contact friends or relatives who may already be involved in a particular profession. After studying all the various options, they should be in a position to make informed comparisons between various careers. Good personal presentation is essential in the search for a good career. Job application forms and letters should, of course, be filled in carefully and correctly, without grammar or spelling errors. Where additional information is asked for, job seekers should describe their abilities and work experience in more depth, with examples if possible. They should try to balance their own abilities with the employer's needs, explain why they are interested in a

career with the particular company and try to show that they already know something about the company and its activities. When graduates are asked to attend for interview, they should prepare properly by finding out all they can about the prospective employer. Dressing suitably and arriving for the interview on time are also obviously important. Interviewees should try to give positive and helpful answers and should not be afraid to ask questions about anything they are unsure about. This is much better than pretending to understand a question and giving an unsuitable answer. There will always be good career opportunities for people with ability, skills and determination; the secret to securing a good job is to be one of them. Question: In paragraph 3, 'three stages for graduates' refers to: A. stages in the assessment of personal interests B. stages for the completion of a university degree or diploma course .

C. all of the above Correct D. stages in the process of securing a suitable career Answer Key: D Question 16 of 20 10.0 Points Read the passage and answer the following: FINDING A JOB Not so long ago almost any student who successfully completed a university degree or diploma course could find a good career quite easily. Companies toured the academic institutions, competing with each other to recruit graduates. However, those days are gone, even in Hong Kong, and nowadays graduates often face strong competition in the search for jobs. Most careers organizations highlight three stages for graduates to follow in the process of securing a suitable career: recognizing abilities, matching these to available vacancies and presenting them well to prospective employers. Job seekers have to make a careful assessment of their

own abilities. One area of assessment should be of their academic qualifications, which would include special skills within their subject area. Graduates should also consider their own personal values and attitudes, or the relative importance to themselves of such matters as money, security, leadership and caring for others. An honest assessment of personal interests and abilities such as creative or scientific skills, or skills acquired from work experience, should also be given careful thought. The second stage is to study the opportunities available for employment and to think about how the general employment situation is likely to develop in the future. To do this, graduates can study job vacancies and information in newspapers or they can visit a careers office, write to possible employers for information or contact friends or relatives who may already be involved in a particular profession. After studying all the various options, they should be in a position to make informed comparisons between various careers. Good personal presentation is essential in the search for a good career. Job application forms and letters should, of course, be filled in carefully and correctly, without grammar or spelling errors. Where additional information is asked for, job seekers should describe their abilities and

work experience in more depth, with examples if possible. They should try to balance their own abilities with the employer's needs, explain why they are interested in a career with the particular company and try to show that they already know something about the company and its activities. When graduates are asked to attend for interview, they should prepare properly by finding out all they can about the prospective employer. Dressing suitably and arriving for the interview on time are also obviously important. Interviewees should try to give positive and helpful answers and should not be afraid to ask questions about anything they are unsure about. This is much better than pretending to understand a question and giving an unsuitable answer. There will always be good career opportunities for people with ability, skills and determination; the secret to securing a good job is to be one of them. Question: 'each other ' in paragraph 2 refers to: A. three stages

B. available vacancies Correct C. career organizations D. job seekers Answer Key: C Question 17 of 20 10.0 Points Choose the correct option. We_________ around the parking lot for 20 minutes in order to find a parking space. A. driven B. drive Correct C. drove D. drived Answer Key: C Question 18 of 20 10.0 Points

Choose the correct option: a)While I was writing the email, the computer suddenly went off. b) When I write letters, the computer goes off. c) Writing letters make my computer go off A. None of the above Correct B. a C. c D. b Answer Key: B Feedback: Past progressive to indicate an interrupted Action in the Past. Question 19 of 20 10.0 Points Identify the tense: A rhinoceros was swatting flies with his tail when suddenly a fly bit him A. Past perfect continuous

B. Past Simple C. Past perfect Correct D. Past Progressive Answer Key: D Feedback: Past progressive indicates two actions in the same sentence, it expresses the idea that both actions were happening at the same time. The actions are parallel. Question 20 of 20 10.0 Points Choose the correct option: Not again! This is the third time that I ....... my keys since I ........ home this morning. A. will lose/have left B. had lost/left C. lose/had left D. am losing/was leaving

Correct E. have lost/left Answer Key: E WT WEB TECHNOLOGY: 100.0 Points Question 1 of 10 10.0 Points Which of the following sequences of HTML tags is correct?

A. <html><head><title></<title><body></body></head></h tml>

B. <html><title></<title><head></head><body></body></h tml>

C. <html><head></head><body><title></<title></body></h tml>

D. <html><head><title></<title></head><body></body></h tml> Answer Key: D Feedback: <html><head><title></<title></head><body></body></h tml> Question 2 of 10 10.0 Points What does CSS stand for?

A. Cascading Style Sheets

B. Common Style Sheets

C. Central Style Sheets

D. Control Style Sheets Answer Key: A Question 3 of 10 10.0 Points How would you define id selector?

A. None of the above

B. id selector as #

C. id selector as @

D. id selector as $ Answer Key: B

Question 4 of 10 10.0 Points In an HTML document, which is the correct place to refer to an external style sheet?

A. In the <head> section

B. At the end of the document

C. At the beginning of the document

D. In the <body> section Answer Key: A Question 5 of 10 10.0 Points Which of the following tags would you use to insert JavaScript in an HTML page?

A. <script type="text/javascript"></script>

B. <HTMLScript type="text/javascript"></HTMLScript>

C. <JScript type="text/javascript"></JScript>

D. <JavaScript type="text/javascript"></JavaScript> Answer Key: A Question 6 of 10 10.0 Points The -------- JavaScript is also known as server-side JavaScript.

A. Navigator

B. Microsoft

C. LiveWire

D. Native Answer Key: C Question 7 of 10 10.0 Points The following code would allow you to set background with CSS: <style type="text/css"> body {background-color: yellow} </style>

True False Answer Key: True Question 8 of 10 10.0 Points If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?

A. para1.firstChild.nodeValue= "New Text";

B. para1.nodeValue="New Text";

C. "New Text"?

D. para1.value="New Text"; Answer Key: D Question 9 of 10 10.0 Points How does JavaScript store date in a date object?

A. None of the above

B. The number of seconds since Netscape's public stock

offering.

C. The number of milliseconds since January 1st, 1970

D. The number of days since January 1st, 1900 Answer Key: C Question 10 of 10 10.0 Points How would you define First-line pseudo-element in CSS?

A. None of the above

B. selector:pseudo-elements {property: values}

C. select:pseudo-element {property: value}

D. selector:pseudo-element {property: value}

Answer Key: D

Java Part 1 of 1 - 100.0 Points Question 1 of 10 10.0 Points Among the following options, choose the four options that describe the appropriate default values for array elements of the types indicated? 1. int -> 0 2. String -> "null" 3. Dog -> null 4. char -> '\u0000' 5. float -> 0.0f 6.boolean -> true

A. 2, 4, 5, 6

B. 1, 2, 3, 4

C. 3, 4, 5, 6

D. 1, 3, 4, 5 Answer Key: D Feedback: (1), (3), (4), (5) are the correct statements. (2) is wrong because the default value for a String (and any other object reference) is null, with no quotes. (6)is wrong because the default value for boolean elements is false. Question 2 of 10 10.0 Points Which option among the following lists only Java programming language keywords?

A. class, if, void, long, Int, continue

B. try, virtual, throw, final, volatile, transient

C. goto, instanceof, native, finally, default, throws

D. byte, break, assert, switch, include

E. strictfp, constant, super, implements, do Answer Key: C Feedback: All the words in goto, instanceof, native, finally, default, throws are among the 49 Java keywords. Although goto reserved as a keyword in Java, goto is not used and has no function. class, if, void, long, Int, continue is wrong because the keyword for the primitive int starts with a lowercase i. try, virtual, throw, final, volatile, transient is wrong because "virtual" is a keyword in C++, but not Java.

strictfp, constant, super, implements, do is wrong because "constant" is not a keyword. Constants in Java are marked static and final. byte, break, assert, switch, include is wrong because "include" is a keyword in C, but not in Java. Question 3 of 10 10.0 Points Which of the following options would legally declare, construct, and initialize an array?

A. int myList [] = {4, 3, 7};

B. int myList [] [] = {4,9,7,0};

C. int [] myList = {"1", "2", "3"};

D. int [] myList = (5, 8, 2); Answer Key: A

Feedback: The only legal array declaration and assignment statement is int myList [] = {4, 3, 7}; int [] myList = {"1", "2", "3"}; is wrong because it initializes an int array with String literals. int [] myList = (5, 8, 2);is wrong because it use something other than curly braces for the initialization. int myList [] [] = {4,9,7,0}; is wrong because it provides initial values for only one dimension, although the declared array is a twodimensional array. Question 4 of 10 10.0 Points You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

A. private

B. protected

C. public

D. transient Answer Key: C Feedback: Access modifiers dictate which classes, not which instances, may access features. Methods and variables are collectively known as members. Method and variable members are given access control in exactly the same way. private makes a member accessible only from within its own class protected makes a member accessible only to classes in the same package or subclass of the class default access is very similar to protected (make sure you spot the difference) default access makes a member

accessible only to classes in the same package. public means that all other classes regardless of the package that they belong to, can access the member (assuming the class itself is visible) final makes it impossible to extend a class, when applied to a method it prevents a method from being overridden in a subclass, when applied to a variable it makes it impossible to reinitialise a variable once it has been initialised abstract declares a method that has not been implemented. transient indicates that a variable is not part of the persistent state of an object. volatile indicates that a thread must reconcile its working copy of the field with the master copy every time it accesses the variable. After examining the above it should be obvious that the access modifier that provides the most restrictions for

methods to be accessed from the subclasses of the class from another package is protected. public is also a contender but protected is more restrictive, private would be the answer if the constraint was the "same package" instead of "any package" in other words the subclasses clause in the question eliminates default. Question 5 of 10 10.0 Points interface Base { boolean m1 (); byte m2(short s); } 1.interface Base2 implements Base {} 2.abstract class Class2 extends Base { public boolean m1(){ return true; }} 3.abstract class Class2 implements Base {} 4.abstract class Class2 implements Base { public boolean m1(){ return (7 > 4); }} 5.abstract class Class2 implements Base { protected boolean m1(){ return (5 > 7) }}

A. 1 and 2

B. 3 and 4

C. 2 and 3

D. 1 and 5 Answer Key: B Feedback: 3) is correct because an abstract class doesn't have to implement any or all of its interface's methods. (4) is correct because the method is correctly implemented ((7 > 4) is a boolean). (1) is incorrect because interfaces don't implement anything. (2) is incorrect because classes don't extend interfaces. (5) is incorrect because interface methods are implicitly public, so the methods being implemented must be public. Question 6 of 10 10.0 Points

Among the 6 options provided below, which three form part of correct array declarations? 1.public int a [ ] 2.static int [ ] a 3.public [ ] int a 4.private int a [3] 5.private int [3] a [ ] 6.public final int [ ] a

A. 1, 3, 4

B. 2, 4, 5

C. 2, 5, 6

D. 1, 2, 6 Answer Key: D

Feedback: (1), (2) and (6) are valid array declarations. Option (3) is not a correct array declaration. The compiler complains with: illegal start of type. The brackets are in the wrong place. The following would work: public int[ ] a Option (4) is not a correct array declaration. The compiler complains with: ']' expected. A closing bracket is expected in place of the 3. The following works: private int a [] Option (5) is not a correct array declaration. The compiler complains with 2 errors: ']' expected. A closing bracket is expected in place of the 3 and <identifier> expected A variable name is expected after a[ ]. Question 7 of 10 10.0 Points Which of the following is/are legal method declarations? 1.protected abstract void m1();

2.static final void m1(){} 3.synchronized public final void m1() {} 4.private native void m1();

A. 2 and 4

B. 1 and 3

C. 1 only

D. All of them are legal declarations. Answer Key: D Feedback: All the given statements are legal declarations. Question 8 of 10 10.0 Points Which three among the following are valid method signatures in an interface? 1.private int getArea();

2.public float getVol(float x); 3.public void main(String [] args); 4.public static void main(String [] args); 5.boolean setFlag(Boolean [] test);

A. 1 and 2

B. 2, 3 and 5

C. 3, 4, and 5

D. 2 and 4 Answer Key: B Feedback: (2), (3), and (5). These are all valid interface method signatures. (1), is incorrect because an interface method must be public; if it is not explicitly declared public it will be

made public implicitly. (4) is incorrect because interface methods cannot be static. Question 9 of 10 10.0 Points Which option among the following creates an instance of an array?

A. int[ ] ia = new int[15];

B. float fa = new float[20];

C. char[ ] ca = "Some String";

D. int ia[ ] [ ] = { 4, 5, 6 }, { 1,2,3 }; Answer Key: A Feedback: int[ ] ia = new int[15]; is correct. It uses correct array declaration and correct array construction.

float fa = new float[20]; is incorrect. It generates a compiler error: incompatible types because the array variable declaration is not correct. The array construction expects a reference type, but it is supplied with a primitive type in the declaration. char[ ] ca = "Some String"; is incorrect. It generates a compiler error: incompatible types because a string literal is not assignable to a character type variable. int ia[ ] [ ] = { 4, 5, 6 }, { 1,2,3 }; is wrong, it generates a compiler error <identifier> expected. The compiler thinks that you are trying to create two arrays because there are two array initialisers to the right of the equals, whereas your intention was to create a 3 x 3 two-dimensional array. Question 10 of 10 10.0 Points Which of the following class level (nonlocal) variable declarations will not compile?

A. private synchronized int e;

B. transient int b = 3;

C. protected int a;

D. volatile int d; Answer Key: A Feedback: private synchronized int e; will not compile; the synchronized modifier applies only to methods. protected int a; and transient int b = 3; will compile because protected and transient are legal variable modifiers. volatile int d; will compile because volatile is a proper variable modifier.

Question 1 of 10 10.0 Points ls command in UNIX A. Gives the currently logged session details B. Compares two numerals and prints the lower value Correct C. Lists the files in a directory D. Compare the size of two files Answer Key: C Feedback: ls command in UNIX lists all the contents in a directory. Ls can be used with many options to display additional details Question 2 of 10 10.0 Points Which among the following is not a part of UNIX operating system A. Programs

B. Kernel C. Shell Correct D. Libraries Answer Key: D Feedback: Libraries. The UNIX operating system is made up of three parts; the kernel, the shell and the programs. Question 3 of 10 10.0 Points In UNIX, the shell act as an interface between user and A. Programs B. Hardware Correct C. Kernel D. Operating System Answer Key: C Feedback: The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts

another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. Question 4 of 10 10.0 Points Everything in UNIX is Correct A. a file or a process B. a Process C. None D. a File Answer Key: A Feedback: Everything in UNIX is either a file or a process. A process is an executing program identified by a unique PID (process identifier). A file is a collection of data. They are created by users using text editors, running compilers etc. Question 5 of 10 10.0 Points Which command is used for changing directory in UNIX?

A. cddir B. chgdir C. mkdir Correct D. cd Answer Key: D Feedback: The command cd directory means change the current working directory to 'directory'. The current working directory may be thought of as the directory you are in, i.e. your current position in the file-system tree. Question 6 of 10 10.0 Points In UNIX, file permissions are not set for A. Other users B. User Groups C. User Correct D. Devices

Answer Key: D Feedback: Every directory and file on the system has an owner, and also an associated group. It also has a set of permission flags which specify separate read, write and execute permissions for the 'user' (owner), 'group', and 'other' (everyone else with an account on the computer) Question 7 of 10 10.0 Points In Unix, how can you read the manual help pages about a command A. Type 'options' and the command B. Type 'help' and the command Correct C. Type 'man' and the command D. Type 'details' and the command Answer Key: C Feedback: To see what all a Linux command can do, type "man <command>". This will show you the manual of the specified command. Question 8 of 10 10.0 Points Which is the most common text editor in UNIX ?

A. Open office B. Word C. notepad Correct D. Visual editor Answer Key: D Feedback: The default editor that comes with the UNIX operating system is called vi (visual editor). Alternate editors for UNIX environments include pico and emacs, a product of GNU. Question 9 of 10 10.0 Points You have created a shell script and wants to run the script. What should you do before trying to run the script ? Correct A. Update the execute permission of the script B. Give ownership of the file to system admin C. Compile the script to create the executable

D. No action required Answer Key: A Feedback: You have to update the execute permission of the script using the command 'chmod' Question 10 of 10 10.0 Points Which is valid mode of operation in vi editor ? A. Append mode B. Open mode Correct C. Command Mode D. Typing mode Answer Key: C

Das könnte Ihnen auch gefallen