32
PROGRAMMING TECHNIQUES PART1-FUNDAMENTALS 1) What is ADVANTAGE of using ARRAYS & LOOPS in the PROGRAM? a) Code become simpler to maintain b) Code is mostly shorter in size c) Both a & b d) None 2) Which of the following is a NON-LINEAR DATA STRUCTURE? a) Queue b) Stack c) Graph d) Array 3) What is the correct term for "homogeneous collection of elements stored in adjacent memory locations"? a) Linked List b) Element Set c) Array d) Sorted Collection 4) Which of the following is not relevant to the data section in your program? a) Storage class b) Flow control c) Scope d) Visibility 5) Where are local variables stored in memory? a) Stack Segment b) Heap Segment c) Code segment d) Data Segment 6) Who performs memory allocation in your program? a) Memory card device driver

All Quizzes

Embed Size (px)

Citation preview

Page 1: All Quizzes

PROGRAMMING TECHNIQUES

PART1-FUNDAMENTALS

1) What is ADVANTAGE of using ARRAYS & LOOPS in the PROGRAM?

a) Code become simpler to maintainb) Code is mostly shorter in sizec) Both a & bd) None

2) Which of the following is a NON-LINEAR DATA STRUCTURE?

a) Queueb) Stackc) Graphd) Array

3) What is the correct term for "homogeneous collection of elements stored in adjacent memory locations"?

a) Linked Listb) Element Setc) Arrayd) Sorted Collection

4) Which of the following is not relevant to the data section in your program?

a) Storage classb) Flow controlc) Scoped) Visibility

5) Where are local variables stored in  memory?

a) Stack Segmentb) Heap Segmentc) Code segmentd) Data Segment

6) Who performs memory allocation in your program?

a) Memory card device driverb) User of Applicationc) Operating systemd) Network card

Page 2: All Quizzes

7) You have just purchased Modem & it has come with a CD. The program on the CD helps your computer to communicate with modem. Which type of software do you think it is?

a) System softwareb) Application Softwarec) Utilitiesd) None of the Above

8) During compilation which program is responsible for including library functions in your code?

a) Loaderb) Linkerc) Compilerd) Interpreter

9) Let us say you are interested in building a job processing software where each job is handled on first come first serve basis. Which data structure would you like to use?

a) Arrayb) Linked Listc) Stackd) Queue

10) Which of the following languages is mostly liked to be used for SCIENTIFIC APPLICATIONS such as ARTIFICIAL INTELLIGENCE?

a) Cb) Javac) Fortrand) LISP

Page 3: All Quizzes

PART-2

UNDERSTANDING LOGIC

1. Action keywords such as PRINT, DISPLAY, SHOW are used for?a. Inputb. Output c. Initialized. Compute

2. How are relationships stored in relational database management system?a. Nodesb. Clustersc. Tables d. Columns

3. Which flowchart symbol would you use for INPUT & OUTPUT?a. Rounded rectangleb. Squarec. Arrowd. Parallelogram

4. Which of the following tells the computer which steps to perform & the order in which to perform them- in order to solve them?a. Task orderb. Algorithm c. Formulaed. Execution stack

5. Why can’t you use human languages for representing algorithms?a. Difficult to understandb. Many different languagesc. Introduces ambiguity in the solution d. None of the above

6. Main difference between the while loop & the repeat until loop (do while) is?a. No differenceb. Repeat until gets executed at least once, whereas while loop may or may

not get executed.

Page 4: All Quizzes

c. While loops are much slowerd. Repeat until is difficult for compilers to understand.

7. Which of the following is a basic condition construct in pseudo code?a. Sequenceb. Whilec. Ford. If-then-else

8. If you & your colleague requires a record file, one of you wants to write to it, while the other just wants to read the data. Which of the following would be the best option.?a. Both of you should go for a shared lockb. Both of you should go for an exclusive lock.c. The one who wants to read should go for an exclusive lock, while the one who

wants to write to it should ask for a shared lock.d. The one who wants to write to it should go for an exclusive lock while the

one who just wants to read from it should go for a shared lock.

9. Which of the following is NOT a database management system function?a. Securityb. Efficient access & retrieval of datac. Message delivery d. None of the above

10. What does cylinder represent in flowchart terminology?a. Containerb. Document setc. Data base d. Central core of processing cluster

Page 5: All Quizzes

PART-3

PROGRAMMING STYLES

1. Short names are OK for local variables?a. They are referred very close to their definition & extra space taken up by

them can be irritating to the reader.b. Shorter names increases the efficiency of the code.c. Shorter the name, easier the program to understand.d. None of the above.

2. If I have a function that determines the first rank holder in a class, what should be the function ideally called?a. CalculateRanks()b. ObtainTopRowinDB()c. Get FirstRankHolder() d. ComputerFirstArrayElement()

3. Why is it better to break up complex expressions into simpler steps?a. Code optimizationb. Easy readability & code management c. Both 1& 2d. Neither 1 nor 2

4. Why should you prefer descriptive names for global variables?a. They are more important than others.b. They are referred more frequently at locations away from their definition.

So this makes it easy to understand what the variable does.c. Global variables need to be minimum 10 characters in length in most

programming languages.d. All the above.

5. If I have a global variable that stores the speed of the engine, what is the best name for the same?a. EngineSpeed

Page 6: All Quizzes

b. Ic. ESd. Engine

6. What is the problem with the set of these variables-WindowWidth, WinWeight & Wheight?a. They are not of same order.b. Inconsistent wording for window will make it difficult to realize that it is

the same concept.c. Spelling mistake- window should be spelt with windouwd. None of the above

7. Which of the following is likely to be a constant?a. TotalValueb. totalvaluec. totalValued. TOTAL_VALUE

8. Parenthesis can be used to?a. Simplify complex expressions b. Optimize program speedc. Reduce memory requirementd. None of the above

9. Which of the following is a better replacement for HandleOutput()?a. HandleSolution()b. printOutputToPrinter() c. DealWithOutput()d. ProcessOutput()

10. Why is coding style important?a. Makes code easier to understandb. Makes code easy to maintainc. Reduced possibility of introducing bugsd. All the above

Page 7: All Quizzes

PART-4

PROGRAMMING NUANCES

1. What is the real importance of indentation in programs?a. Makes the program easy to readb. Reduces the possibility of bugsc. Both 1&2 d. None of the above

2. What will happen if you do not use consistent notation in you program?a. Your program will take more time to run.b. You program will be difficult to read by others. c. You program will consume more processor cyclesd. All of the above.

3. Which of the following is false (w.r.t comments)?a. Sole purpose of comments is to improve readability of codeb. Commenting should be done mechanically c. Comments can never make up sloppy coded. It is better to rewrite bad code than to just add comments

4. How do you avoid magic numbers in code?a. Set the ‘NO MAGIC’ parameterb. Provide explanation for why certain numbers appear in the code the way they doc. Use constants in place of actual numerals & comment the constant definition welld. Both 2 &3

5. Which of the following is NOT true as far as subroutines are concerned?a. One subroutine: one taskb. Each subroutine should be preceded with a comment explaining it’s purposec. Too many comments can slow down the speed of subroutine execution

Page 8: All Quizzes

d. Subroutines should be short enough for the reader to grasp their meaning as a unit.

6. Why does consistency need to be enforced by the programmer?a. Different programming languages have different programming constructsb. Compilers often change the code during optimizationc. Single programming language lets you encode instructions in multiples

ways(each of which is equally correct)

d. Most programmers are not aware of correct order of programming

7. How many statements should you ideally put on one line of program?a. 1 b. 2c. Depends on compilerd. None

8. What can the ‘correct use of braces’ help you achieve?a. It is used for ornamental decoration of your codeb. Optimizes the speed of the programc. Increases the memory available to the compilerd. Reduce the ambiguity in code by clarifying your intentions to the compiler

as well as to any human reading the program.

9. Level of indentation should correspond to which of the following?a. Program complexityb. Level of nesting c. Data usaged. None of the above

10. What are magic numbers?a. Number that magically keep changing the valueb. Number that are only accessible by ‘wizard’ level programmersc. Absolute numbers that appear in you program without any explanation d. None

Page 9: All Quizzes

DATABASE MANAGEMENT SYSTEMS

PART-1

INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

1) In the architecture this comprises of the DBMS FUCNTIONS:a) Internal Levelb) External levelc) Conceptual Level d) None of these

2) Arrange the following in order for data base system1. For data access the meta-data is referenced and finally the data is fetched from

the data bases2. The query is further processed and analyzed by a software and further forwarded

to the software for data access.3. The user/programmer interacts with the data base systems with either an

interface or directly a query.

a) 3,2,1 b) 1,2,3c) 2,3,1

3) The security features of the data base are set up by_____

a) Database administrator

Page 10: All Quizzes

b) Application programmerc) Online usersd) Naïve users

4) Which language is used to permit or prohibit access to a table?

a) DCL b) DDLc) DMLd) All the above

5) Which of the following are the roles of the Data base administrator?

a) Managing security issuesb) Storage Structure definitionc) Develop application programsd) Take backups of the data base

6) The database oriented approach_________ the redundancy of data compared to the file oriented approach.

a) Reduces b) Increases

7) The database system solves the following issues

a) Security problemb) Data Integrity problemc) Concurrent Access problemd) All the ABOVE.

8) _________ can be defined as immunity of applications to change in physical representation and access technique.

a) Data redundancyb) Data storagec) Data Dependencyd) Data Independency

9) Which language is used to define integrity constants?

a) DDL b) DCLc) DMLd) None of these

10) The relationship between data is defined in the ______

Page 11: All Quizzes

a) View Levelb) Physical levelc) Logical level

PART-2

DATA MODELS

1. Identify the following that can be categorized as entity?a. Bankb. Loanc. Assetd. All of the above

2. Given a system description arrange the following in order.1. Identify all the attributes2. Map the cardinality3. Identify the entities4. Map the relationships

a. 1,2,3 &4b. 3,1,4,2 c. 3,1,4,3d. 2,1,3,4

3. In the relational model, the number of rows in a table is termed as _____a. Cardinality b. Degree

Page 12: All Quizzes

c. Domaind. None

4. In this representation, the entity set is treated as a single unit, without concern for the details of this internal structure.a. Specializationb. Generalizationc. Aggregation d. Relationalization

5. Which data model uses graphs for implementation?a. ER modelb. Object relational modelc. Network model d. Object oriented model

6. Which data model organizes the data in the form of tables & relations?a. Hierarchical modelb. Relational model c. Network modeld. None

7. This model allows attributes of tuples to have complex types, including non-atomic values such as nested relationsa. Hierarchical modelb. Relational modelc. Network modeld. Object oriented relational model

8. A customer may have several accounts, each in a specific branch. An account may belong to several different customersa. Hierarchical modelb. Network model c. Both a & bd. None

9. In the relational model, each ____ contains values for the _____a. Attribute, Tuples b. Tuple, attributesc. Relation, entitiesd. Entity, domains

10. Which structure is the relational model based on?a. Treeb. Graph

Page 13: All Quizzes

c. Linked listd. None

PART-3

RELATIONAL DATA MODELS & SQL

1. In ER to R mapping entity becomes ________a. Rowsb. Columnsc. Tables d. Data dictionary

2. The most suitable candidate key is chosen as____a. Primary key b. Foreign keyc. Composite primary keyd. Super key

3. A _______ is one whose existence depends on another entitya. String entityb. Weak entity

Page 14: All Quizzes

c. Referential entityd. Referential integrity

4. A database consists of___a. No relationsb. Single relationc. Multiple relations d. None of the above

5. When you normalize a relation by breaking it into two smaller relations, what must you do to maintain data integrity?a. DeLink the relations by a common fieldb. Remove any functional dependencies from both relationsc. Assign both relations the same primary key field(s)d. Create a primary key(s) for the new relation

6. A relation is in 1NF if it doesn’t contain any ____a. Determinantsb. Repeating groups c. Null values in primary key fieldsd. Functional dependencies

7. A table is in the third normal forma. If it is in 2NF & every non key attribute is non transitively dependant on

candidate keyb. If it is in 1NF & every non key attribute is non transitively dependant on

candidate keyc. If it is in 3NF & every non key attribute is non transitively dependant on

candidate keyd. None of the above

8. The repetition of data causes following anomalies__a. Insertion anomaliesb. Deletion anomaliesc. Update anomaliesd. All of the above.

9. If C1->C2,C2->C3,& C1->C3 that means:a. C1 is transitively dependant on C2b. C2 is transitively dependant on C3c. None of the above

Page 15: All Quizzes

d. Asset

10. ______ refers to a systematic process of organizing data in database in order to eliminate anomaliesa. Normalization b. Demoralizationc. Redundancyd. None of the above.

PART- 4

TRANSACTIONS

1. A power failure or other hardware or software failure causes the system to crash is which type of failurea. Logicalb. System c. Diskd. None of the above

2. An active transaction if fails will be

Page 16: All Quizzes

a. Committedb. Partially committedc. Remain actived. Aborted

3. This method delays the write operations of a transaction to the database until the transaction partially commitsa. Immediate database modification b. Active database modificationc. Deferred database modificationd. All of the above

4. _______ consists of a sequence of instructions where one transaction is alive, another transaction executes parallel.a. Serial scheduleb. Parallel schedulec. Non serial schedule d. All of the above

5. One of the main techniques used for controlling the concurrent execution of transactionsa. Locks b. Schedulesc. Modelsd. Al of the above

6. If two ongoing transactions wait for the locks to be released on each other it is called____a. Exclusive lockb. Shared lockc. Dead lock d. Multiple lock

7. After successful completion of transaction and after all updates are reflected in database then it is said to be ina. Commit state b. Partial commit statec. Roll back stated. None of the above

8. If a transaction Ti has obtained a lock on item Q, Ti can be read, but cannot write Q, which lock supports the mechanisma. Shared b. Exclusivec. Multiple

Page 17: All Quizzes

d. None of the above

9. Either all operations of a transaction are reflected properly in the database or none reflects isa. Atomicity b. Isolationc. Durabilityd. Consistency

10. After discovering that normal execution can no longer proceed, transaction must be roll back. This state isa. Failed b. Abortedc. Committedd. Active

SOFTWARE ENGINEERING-PART1

THE BASICS

1) If we get into an engagement with a customer to take care of customer care center, which kind of project management it would fall under?a) Testing projectb) Business services Group c) Full SDLC Projectd) Brownfield project

Page 18: All Quizzes

2) What would have learned from working on a maintenance project?a) You will never be interacting with the customerb) You would take a very long time to relate to someone else’s workc) You learn to work under pressures d) None of the above

3) If we get into engagement with a customer to take care of providing an entire solution wherein everything is done from scratch and nothing is available to our interaction with the customer. What type of engagement would that me?a) Green field project b) Managed servicesc) Brown field projectd) Maintenance project

4) If you are a part of BSG GROUP, one or more of below would be your responsibilitya) You would be managing a group of customer care agentsb) You would be working as a consultant for a clientc) Only A d) Both A & B

Correct answer is “d”. According to QUIZ, they have given answer as “c”.

5) A customer is using a legacy application over the years. They have asked us to look at the application and do necessary changes either to enhance the performance or to incorporate any changes as required. In the scenario, we are handling which type of engagement?a) Green field projectb) Managed servicesc) Brown field projectd) Maintenance project

6) Techmahindra has delivered a solution to the customer and is having a contract to handle customization to the solution in the future. What type of engagement is this?a) Green field projectb) Managed services c) Brown field projectd) Maintenance project

7) As a tester if you find bugs in your friend’s code, you should..a) Not report it.b) Report to friend but do not record it.c) Report to friend and record in bug report. d) Solve it on your own so that your friend will not be insulted.

Page 19: All Quizzes

8) We have delivered a full SDLC project to a customer. Government has made changes in their regulatory policies which need to be incorporated in the application. Customer approaches us to deliver those changes. In such a scenario, what kind of project has been given to us?a) Managed servicesb) Maintenance project c) Full SDLC projectd) System integration

9) As a good developer, what will you do if you do not know how to solve the given problema) Keep trying till you get it.b) Do nothingc) Tell the manager immediately that you may not be able to perform the task.d) Try to solve the problem on your own not more than 10% of allocated

time. If you feel you still have no clue, ask for direction from manager.

10) As a maintenance team, what is the most important item will you think about?a) Meeting SLAb) Understanding customer requirementc) Configuration managementd) All the above

SOFTWARE ENGINEERING-PART2

Page 20: All Quizzes

SDLC PHASES

1) SDLC is applicable only for development projectsa) True b) False

2) What is the main aim of requirement analysis?a) It should meet the objectives b) The solution should be cost effectivec) To minimize the customer interaction

3) People who fund the project and demand the services are referred asa) Stake holdersb) Customersc) Sponsors d) Domain experts

4) Successful project is one that meets or exceeds the expectations of one of the important stake holdera) EndUser b) Software developerc) Software vendord) Tester

5) What does L1 maintenance indicate?a) The bug is of very low importanceb) The bug needs code correctionc) The bug can be a show stopper d) It is also known as enhancement request

6) Operational requirements cover the following areasa) Databases, GUI and serversb) Capacity, performance, security. c) Objectives and/or basic requirementsd) Interfaces to other systems, manual process changes, and data cleaning

7) Which maintenance level is also known as maintenance requesta) L1b) L2c) L3

Page 21: All Quizzes

8) Successful project is one that has following aspectsa) All the work gets completedb) Work gets completed and there are no change requests pendingc) Work is done in agreed time, money and as per customer requirements d) Customer pays all the money

9) System is handed over in which phasea) Constructionb) Testingc) Acceptance d) Requirement capture

10) Which maintenance level requires making configuration changes, initialization and value resting?a) L1b) L2 c) L3

Page 22: All Quizzes

SOFTWARE ENGINEERING-PART3

SDLC MODELS

1) In which of the following, would you choose to apply the waterfall model?

a. Change in requirements is frequent and come throughout.b. Requirements are clearly defined by a knowledgeable customer and

many changes are not expected.c. We need to get the product to the market immediately.d. System needs to be developed in small workable solutions.

2) Why is the pure waterfall model of software development not recommended for large scale software projects?

a. It is standard model with many tools and techniques that are very difficult to use and not cost effective.

b. Other models ensures big bang developments whereas waterfall model delivers the software in functional slices which is not cost effective.

c. It is standard model but time consuming and all requirements are to be finalized upfront, which may not be practical.

d. Large scale project does not have the environment and set up to implement this standard model.

3) Integration difficulties are a major disadvantage of which software engineering approach?

a. Incremental b. Spiralc. Waterfalld. Prototyping

4) Spiral model delivers the product after each iteration?

a. True b. False

5) Which statement about a prototype is a valid one?a. It a functional model of entire systemb. It is the complete untested product ready for final review by the customer.

Page 23: All Quizzes

c. It is necessary in order to accurately verify that the product is progressing in accordance with requirement specifications.

d. It is a full scale model of entire system at some partial stage in development showing the functional form of the system.

6) Which of the following is not true about agile?a. Agile method focuses on shorter iterationsb. In agile short iterations help to keep quality under control.c. In agile large backlogs of defect correction work are entertained later. d. You have to build frequently, atleast every day, and you have to develop this

discipline to keep the build healthy.

7) In V model, the major improvement over the waterfall model is?a. Validation at every stage. b. Customer satisfaction.c. Concurrent development.d. More resource utilization.

8) As a team member, if you are working on agile, how will you help you project manager?a. By documenting each and everything you do.b. Work day and night.c. Attend scrum everyday and carry our tasks allocated to you to

satisfaction.d. By plotting burn down chart.

9) Customer is not very clear with the requirement. Even after couple of discussions, the project team is not able to finalize the requirement. Which would be the best development approach in this scenario?a. Incrementalb. Prototype c. Waterfalld. Spiral

Page 24: All Quizzes

SOFTWARE ENGINEERING-PART4

PM OVERVIEW

1) As a team member, if you are working on agile, how will you help you project manager?

a. By documenting each and everything you dob. Work day & night.c. Attend scrum everyday and carry out tasks allocated to you to satisfaction. d. By plotting burn down chart.

2) A change can be incorporated in the software?

a. Always the first version.b. Always the last version.c. You can incorporate change in any version of the software.

3) The bundle of configuration items that can define the state of a particular environment at a particular time is called?

a. Baseline b. Milestonec. Configuration testerd. Package

4) A framework for handling change in a controlled manner so that changes do not have negative impact on quality?

a. Version managementb. Configuration management c. Software managementd. None of the above

Page 25: All Quizzes

5) Project management life cycle starts after which stage of software life cycle?

a. After analysis stageb. After requirements stagec. After design staged. Project management activities start from the time the project is initiated.

6) Before we can modify any configuration item, what activity need to be performed related to configuration management tool?

a. Check inb. Check out c. Authorized. Back up

7) Primary impact of change will be on..?

a. Productivityb. Performancec. Schedule d. Customer satisfaction (CSAT)

8) When a configuration item undergoes a change, how is it saved?

a. It is saved as a new version b. It is saved as a new releasec. It is saved under same version numberd. It is saved as new CI

9) Significant point in the schedule is called as?

a. Milestone b. Deliverablec. Baselined. Release

10) Which of the following cannot be included in configuration item/

Page 26: All Quizzes

a. Hardwareb. Softwarec. Details of the project team d. Project artifacts

VVT-SOFTWARE TESTING

QUIZ

1. HPQC stands fora. HP quality center b. HP quality configurationc. HP quality controllerd. None of the above

2. When is sanity testing performed?a. After live deploymentb. Immediately after developmentc. Just before live deployment d. Just before regression testing

3. VV & T stands fora. Verification & value testingb. Validation & value testingc. Verification & validation testing d. None of the above

4. CST stands fora. Component system testing b. Continuous system testingc. Configuration system testingd. Controlled system testing

Page 27: All Quizzes

5. Which of the following statements are valid while writing test cases?a. TestCases are high level plan of testingb. TestCases are detailed step by step instructions for testing c. TestCases are similar to TestPland. All the above

6. Key practice of agile testing methodology isa. Daily status reportb. Daily standup meeting c. A & Bd. None of the above

7. Testing metrics is a measure of a. Test designb. Test planc. Progress of test execution d. All the above

8. Test Data preparation is part of which of the followinga. Test initiationb. Test execution c. Test planningd. Test sign off

9. Which of the following is the correct answer?

a. Both coding & testing are integral & indispensable part of the software production cycle.

b. Coding is more challenging than testingc. Coding is must but testing can be avoided in software productiond. Coding & testing, both are avoided in software production.

10. While writing test cases always keep:a. Manager of application in mindb. Developer of application in mind.c. Users of application in mind .d. All the above.