Home Tuitions

Chapter-Programming methodology

Important MCQ questions for Class 11 Computer Science Chapter-Programming methodology

Get Important MCQ questions for Class 11 Computer Science Chapter-Programming methodology with a detailed explanation of all the MCQ questions asked from the Chapter-Programming methodology prepared by the experts. 

Get Selected MCQ-based questions with solutions for Chapter-Programming methodology

MCQ Questions set-1 for chapter-Programming methodology class 11 Computer Science 

Computer Science - MCQ on Programming methodology

Class XI

Q. 1. Printing of the input data, as they are read, is called

a. gravure printing.

b. offset printing.

c. echo printing.

d. screen printing.

Answer:

(c)

Explanation: Printing out the input values is known as echo printing.

Q. 2. Comment explaining the action/role of a statement is known as

a. self-documenting comment.

b. documenting comment.

c. explanatory comment.

d. detailed comment.

Answer:

(c)

Explanation: Explanatory comments explain the role and purpose of other identifiers (variables, constants) and statements.

Q. 3. Writing any number of statements in a line and separating them with a terminator symbol is known as

a. prettyprinting.

b. free formatting.

c. explanatory comments.

d. indent statements.

Answer:

(b)

Explanation: In free formatting style, any number of programs can be written in one line using a statement operator.

Q. 4. Machine code produced by a compiler or assembler from a source code

is known as

a. object code.

b. class code.

c. structure code.

d. defined code.

Answer:

(a)

Explanation: In computer science, an object code, or an object file, is the representation of the code that a compiler or assembler generates by processing a source code file.

Q. 5. Program formatting to make the program more readable is known as

a. free formatting.

b. echo printing.

c. prettyprinting.

d. offset printing.

Answer:

(c)

Explanation: The formatting style does not make any difference for a compiler, but the reader faces a lot of difficulty in understanding the program. Therefore, prettyprinting is encouraged.

Q. 6. The comment summarizing the purpose of a program, procedure or a

function is known as

a. explanatory comment.

b. prologue.

c. documenting comment.

d. detailed comment.

Answer:

(b)

Explanation: Prologue is a sequence of code instructions at the start of a function that preserves registers, sets the CPU state, and establishes the stack. Different calling conventions use different prologues.

Q. 8. Statements without a meaning leads to

a. semantics error.

b. syntax error.

c. runtime error.

d. code error.

Answer:

(a)

Explanation: In programming semantics error means writing a valid programming structure with invalid logic. The compiler will generate instructions that the computer will execute, because it understands the syntax of the programming statements, but the output will not be correct.

Q. 9. The error due to invalid construction of statements in a programming language is known as

a. semantics error.

b. syntax error.

c. runtime error.

d. code error.

Answer:

(b)

Explanation: In computer science a syntax error refers to an error in the syntax of a sequence of characters or tokens that intends to be written in a particular programming language.

Q. 10. Formal rules governing the construction of valid statements in a

language is known as

a. prologue.

b. semantics.

c. syntax.

d. source code.

Answer:

(c)

Explanation: In logic, syntax comprises the rules governing the composition of texts in a formal language that constitute the properly formed formulas.

Q. 11. The set of rules that give meaning to a statement are known as

a. prettyprinting.

b. semantics.

c. syntax.

d. control

Answer:

(b)

Explanation: The semantics of a programming language describes the relationship between the syntactical elements and the model of computation.

Q. 12. Run-time errors occur

a. due to mistaken analysis of program.

b. during the execution of the program.

c. due to violation in grammatical rules.

d. due to violation of rules and regulations in a program.

Answer:

(b)

Explanation: An error that happens only when the program is running is known as run time error.

Q. 13. Logical errors occur

a. due to mistaken analysis of program.

b. during the execution of the program.

c. due to violation in grammatical rules.

d. due to violation of rules and regulations in a program.

Answer:

(a)

Explanation: A fallacy is a component of an argument, which, being demonstrably flawed in its logic or form renders the argument invalid in whole.

Q. 14. The number of types of errors in a program is

a. two

b. three

c. four

d. five

Answer:

(b)

Explanation: There are broadly three types of errors: compile time errors, run time errors and logical errors.

Q. 15. The code that can handle exceptional data errors and operational errors is called

a. source code.

b. object code.

c. guard code.

d. self-documenting code.

Answer:

(c)

Explanation: In order to produce robust programs, it should be coded to handle incorrect data or incorrect operations, which may cause run-time errors or abnormal termination of the program. This code is known as a guard code.

Q. 16. The ability of a program, to recover from an error and to continue operating within its environment, is called

a. robustness.

b. redundancy.

c. consistency.

d. isolation.

Answer:

(a)

Explanation: A program must anticipate situations of data type conflict and all other incompatibilities, which result in run time errors and stop the program. The focus of robustness is the interaction with the user and the handling of error messages.

Q. 17. The statement “Software design technology is a system not a secret” is given by

a. Rachna Sagar.

b. Lawrence Peter.

c. Joan Christ.

d. Joan Peter.

Answer:

(b)

Explanation: Lawrence Peter statement means that a systematic approach in software design should be adopted to develop an acceptable and efficient solution.

Q. 18. 90% of the cost of a program is spent on

a. documentation.

b. designing.

c. coding.

d. testing.

Answer:

(d)

Explanation: The process of exercising software to verify that it satisfies specified requirements and detect errors in it is known as testing. Maximum cost is spent on this stage only.

Q. 19. The process of correcting errors in a program is known as

a. testing.

b. code walkthrough.

c. code evaluation.

d. debugging.

Answer:

(d)

Explanation: Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program.

Q. 20. The process of finding errors in a program is

a. testing.

b. code walkthrough.

c. code evaluation.

d. debugging.

Answer:

(a)

Explanation: The process of exercising software to verify that it satisfies specified requirements and to detect errors in it is known as testing.

Q. 21. The number of kinds of program maintenance are

a. two.

b. three.

c. four.

d. five.

Answer:

(c)

Explanation: There are four kinds of maintenance: corrective maintenance, adaptive maintenance, preventive maintenance and perfective maintenance.

Q. 22. If the existing system is maintained to keep attuned with new features, new facilities, new capabilities, it is said to be `

a. corrective maintenance.

b. adaptive maintenance.

c. perfective maintenance.

d. preventive maintenance.

Answer:

(c)

Explanation: In an information technology world, no technology has proved permanent. Every year, new technologies come with new features, new facilities. Maintenance in order to install new features is known as perfective maintenance.

Q. 23. The type of maintenance, which aims at avoiding errors, is known as

a. corrective maintenance.

b. adaptive maintenance.

c. perfective maintenance.

d. preventive maintenance.

Answer:

(d)

Explanation: If possible errors could be anticipated before they actually occur. the maintenance could be done to avoid them.

Q. 24. The maintenance that is done to rectify the errors is known as

a. corrective maintenance.

b. adaptive maintenance.

c. perfective maintenance.

d. preventive maintenance.

Answer:

(a)

Explanation: When a program after completion, is put to operations, some errors might show up because of some unexpected situations, untested areas. Such errors are fixed and this type of maintenance is known as corrective maintenance.

Q. 25. To accommodate changing needs, time to time, maintenance is done and is called

a. corrective maintenance.

b. adaptive maintenance.

c. perfective maintenance.

d. preventive maintenance.

Answer:

(b)

Explanation: Changes in environment due to information system operations may lead to system maintenance. This maintenance is known as adaptive maintenance.

Q. 26. “I firmly believe that the maintainability of a system is a direct function of how well it was developed initially”. This statement was said by

a. Louis A Rose.

b. Rose P. Lousis.

c. A Rose Louis.

d. Peter Joan.

Answer:

(a)

Explanation: The statement means that maintenance time is totally unnecessary because little planning and testing can avoid that.

Q. 27. The documentation modules are generally referred to as

a. general description.

b. output specification.

c. manuals.

d. layouts.

Answer:

(c)

Explanation: Manuals make information easily accessible to the specific user for which they were prepared, and they reduce the costs of production and maintenance.

Q. 28. The number of modules of documentation (manuals) are

a. seven.

b. eight.

c. nine.

d. ten.

Answer:

(b)

Explanation: List of manuals: user, input preparation, operations, equipment, programmer, program, systems and standard module.

Q. 29. Written descriptions, specifications, design, code and comment, internal and external to a program, which makes the program more understandable is termed as

a. algorithm.

b. layouts.

c. documentation.

d. flowchart program logic.

Answer:

(c)

Explanation: Documentation should describe the who, what, when, where and how of each system application.

Q. 30. The logical sequence of precise steps that solve a given program is

known as

a. documentation.

b. algorithm.

c. flowchart.

d. procedure.

Answer:

(b)

Explanation: An algorithm is a procedure or formula for solving a problem.

Q. 31. The similarity between break and continuous statement is

a. both statements terminate the entire loop execution.

b. both statements terminates single pass of the loop.

c. both statements are jump statements.

d. both statements are evaluated at the entry point of the loop.

Answer:

(c)

Explanation: The break command terminates the execution of the innermost enclosing loop, causing execution to resume after the nearest done statement. The continue command causes execution to resume at the while, until or for statement which begins the loop containing the continue command.

Q. 32. The output of the following code fragment is

for(int i = 1; i<10 ; i++)

cout << i;

a. 1 2 3 4 5 6 7 8 9 10

b. 0 1 2 3 4 5 6 7 8 9

c. 1 2 3 4 5 6 7 8 9

d. 0 1 2 3 4 5 6 7 8 9 10

Answer:

(c)

Explanation: The loop is initialized with 1 and continues up to 9 as i is less than 10.

Q. 33. The syntax error in the following program is

#include<iostream.h>

void main()

{ int R ; W = 90;

while (W>60)

{

R=W-50;

}

}

a. #include<iostream.h>

b. int R ; W = 90;

c. while (W>60)

d. R=W-50;

Answer:

(b)

Explanation: It should be int R, W = 90.Variable list should be separated using commas.

Q. 34. The file which consists of declarations of standard stream input and output facilities is known as

a. stdio.h

b. math.h

c. iostream.h

d. stream.h

Answer:

(c)

Explanation: iostream is a header file, which is used for input/output in the C++ programming language. It is part of the C++ standard library.

Q. 35. Dot Matrix is a type of

a. tape.

b. disk.

c. printer.

d. bus.

Answer:

(c)

Explanation: A dot matrix is a printer that represents each character as a pattern of dots from a dot matrix.

Q. 36. The most common input device used today is

a. motherboard.

b. Central processing unit.

c. keyboard.

d. semiconductor.

Answer:

(c)

Explanation: A keyboard is a data input device for computers; arrangement of keys is modeled after the typewriter keyboard.

Q. 37. The header file that declares various character manipulation routines is known as

a. iomanip.h

b. string.h

c. ctype.h

d. math.h

Answer:

(c)

Explanation: The header ctype.h in the ANSI C Standard Library for the C programming language contains declarations for character classification functions.

Q. 38. The header file which declares the C++ streams, I/O manipulator and contains macros for creating parameterized manipulators is known as

a. iomanip.h

b. string.h

c. ctype.h

d. math.h

Answer:

(a)

Explanation: The iomanip.h header file contains a definition for a macro IOMANIPdeclare(). IOMANIPdeclare() takes a type name as an argument and creates a series of classes you can use to define manipulators for a given kind of stream.

Q. 39. The ability of software written for one computer to run successfully on different machines is known as

a. robustness.

b. portability.

c. maintainability.

d. atomicity.

Answer:

(b)

Explanation: In computer science, portability is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed.

Q. 40. In multiprocessing operating system, the device which decides for how long the execution should take place is known as

a. time scheduler.

b. job scheduler.

c. super computer.

d. super processor.

Answer:

(d)

Explanation: It is the super processor only that decides everything regarding which process is to execute on which processor and for how long.

Q. 41. Processing of more than one job simultaneously by multiple processors is called

a. super processing.

b. multiprocessing.

c. time sharing processing.

d. multitask processing.

Answer:

(b)

Explanation: Simultaneous execution of instructions by multiple processors within a single computer is known as multiple processing.

Q. 42. When a set of processes enter into indefinite wait condition, then it is known as

a. livelock.

b. deadlock.

c. semaphore.

d. critical section.

Answer:

(b)

Explanation: The condition in which two or more processes are blocked, each waiting for a lock held by the other is known as deadlock.

Q. 43. In deadlock situation, when the cancelled job starts all over again it is known as

a. feedback operation.

b. livelock operation

c. paging

d. rollback operation.

Answer:

(d)

Explanation: A rollback operation removes all changes made since the previous commit or rollback operation. The system also releases all locks related to the transaction.

Q. 44. The approach in which the programmer identifies the logical entities in the program and declares them as program components is known as

a. paging.

b. segmentation with paging.

c. segmentation.

d. fragmentation.

Answer:

(c)

Explanation: The division of larger segments into multiple small segments is known as segmentation.

Q. 45. The measure of work done in a given interval of time is known as

a. interrupt.

b. time management.

c. throughput.

d. buffering.

Answer:

(c)

Explanation: Throughput is the number of units of work that can be handled per unit of time; for instance, requests per second, calls per day, hits per second, reports per year, etc.

Q. 46. Primary memory is also known as

a. destructive write and non-destructive read memory.

b. constructive write and non-destructive read memory.

c. destructive read and write memory.

d. constructive write and read memory.

Answer:

(a)

Explanation: Primary memory is termed as non-destructive read memory since the read operation does not destruct the contents of a memory word. Primary memory is termed as destructive write memory as the write operation destructs the contents of a memory word.

Q. 47. The function which appends a string to another string is known as

a. strcpy().

b. strcmp().

c. strcat().

d. toupper().

Answer:

(c)

Explanation: In computing, C++ offers a library function called strcat, which allows one memory block to be appended to another memory block.

Q. 48. The function setw() belongs to

a. math.h file

b. iomanip.h file.

c. C.type file.

d. string.h file.

Answer:

(b)

Explanation: setw() sets the number of characters to be used as the field width for the next insertion operation.

Q. 49. The function fabs() belongs to

a. math.h file

b. iomanip.h file.

c. C.type file.

d. string.h file.

Answer:

(a)

Explanation: The fabs() function computes the absolute value of a floating-point number x.

Q. 50. The statements in a program that are not executed, but point out the purposes of various parts of the program is known as

a. instruction manual.

b. internal documentation.

c. external documentation.

d. subroutines.

Answer:

(b)

Explanation: Computer software is said to have Internal Documentation if the notes on how and why various parts of code operate is included within the source code as comments. It is often combined with meaningful variable names with the intention of providing potential future programmers a means of understanding the workings of the code.