Download COMPUTER SCIENCE MCQS and more Quizzes Computer science in PDF only on Docsity!
ANEES HUSSAIN
EXCELLENCE IN EDUCATION SINCE 1989
IMPORTANT MULTIPLCE CHOICE QUESTIONS (CLASS: XII COMPUTER SCIENCE )
- The function getche( ) is defined in a) conio.h b) stdio.h c) string.h d) math.h
- Another term for a computer making a decision is: a) Sequential b) Selection c) Repetition d) Iteration
- ____________ is used to specify two different choices with “if” statement. a) If-else b) Switch c) Else d) If
- How many times is the test expression of a switch statement evaluated? a) 0 b) 1 c) 2 d) Once for each case
- Which of the following is equivalent to (p>=q)? a) !(p<q) b) p>==q c) p!<q d) none of above
- Another term for a conditional operator is: a) Ternary b) Binary c) Byte d) Iteration
- When a relational expression is false, it has the value __________ a) 0
b) 1 c) < d) S
Which is not possible a) Nesting if statement b) Loop in the body of statement c) If statement in the body of loop d) None of above
An if statement inside the true block of another if statement is called: a) A nested if statement b) A branched if statement c) A conditional operator d) A relational operator
__________ refers to group of statements enclosed in opening and closing braces. a) Compound statement b) Control structure c) Sequence structure d) Instruction
Which of the following is used for making two way decision: a) if-else b) If c) Nested if d) Switch
- Which of the following are valid case statements in a switch? a) Case 1: b) Case x<4: c) Case ‘ab’: d) Case 1.5:
- An expression that uses a relational operator is known as: a) Relational b) Operational c) Sequential d) Serial
- The three programming structures are: a) Sequence, decision, and repitation b) Process, decision, and alternation c) Sequence, definition, and process d) Relation, comparison, and process
b) The value of the first criterion c) The statement to be executed if none of the criteria are true d) The statement to be executed if the criterion are true
Which programming structure executes program statements in order? a) Sequence b) Relation c) Decision d) Repition
Which of the following statements is the simplest form of a decision structure? a) If statement b) Select..case c) Switch statement d) Nested if
A case can be defined as: a) An individual condition to test b) A set of condition of test c) A statement that includes as if statement d) A block of selection
Relational operators allow you to _____________ numbers. a) Compare b) Add c) Multiply d) Divide
Switch statement must use the keyword a) Case b) Default c) Break d) All of the above
break keyword is used in a) None of the above b) If statement c) If-use d) Else-if
- Conditional operator takes _____________ operands. a) 3 b) 2 c) 1 d) 5
If x=10 and y=5,, what will the output of the following expression? x>y? x*y: x+y a) 50 b) 5 c) 10 d) 15
You can use a decision statement to: a) Run a series of statements if a test fails b) Test series of conditions c) Test whether a condition is true or false d) All of these
From the followings which is different a) Function b) If c) Else-if d) Switch
From the following which is called control statement a) If b) If-else c) Else-if d) All of the above
Which of the following is NOT part of an if statement? a) All of are part of an IF statement b) A condition that evaluates as a Boolean c) A condition that evaluates as true or false d) A true block
From the following statement which is the control statement a) If b) Else if c) Switch d) All of the above
Switch statement is an alternative of: a) Nested if-else b) if c) if-else
b) While c) For d) All
A loop within another loop is called a) Nested loop b) Inner loop c) Counter loop d) None
When is while loop more appropriate then for loop? a) The terminating condition occurs unexpectedly b) The body of loop will be executed at least once c) The program will be executed at least once d) The number times the loop will be executed is known before the loop executes
How many types of loop structure are available in C language? a) While b) Do-while c) For d) All of above
This statement causes a loop to terminate early? a) Break b) Terminate c) Exit d) A and B
- This is a control structure that causes a statement or group of statement to repeat: a) Iteration b) Decision statement c) Duration d) Test
- Repetition structure is used to execute a statement or set of statement a) More than one time b) Once c) statement d) All
- In a for statement, this expression is executed only once: a) Initialization
b) Test c) Validation d) All
The loop which never ends is called: a) Infinite loop b) Running loop c) Continuous loop d) Nested loop
What is the value of “a” after the execution of the following code? int a =25; for(int c=0; c<4;c++) a=a-1; a) 24 b) 21 c) 25 d) 20
This loop is a good choice when you know how many times you want the loop to iterate in advance of entering the loop? a) For b) While c) Do-while d) Nested
A loop whose execute never ends is called a) Infinite loop b) Nested loop c) Forever loop d) Counter loop
The loop structure that executes at least ones is a) Do-while b) While c) For d) All of above
One execution of a loop is known as a(n): a) Iteration b) Cycle c) Duration d) Test
When does the code block following while (x<100) execute?
d) While
The body of for loop with single statement ends with: a) Semi colon ; b) Right bracket ] c) Right brace } d) Comma ,
- Popular object oriented languages are: (a) Pascal , cobol (b) C++, Fortran (c) C++, smalltalk (d) cobol, Basic
- In developing a program, documentation should be : (a) As the last step (b) only to explain errors (c) throughout the process (d) only during the design phase
- Error messages provided by a compiler are called: (a) Bugs (b) translations (c) diagonostics (d) mistakes
- The first high level language to be introduced was: (a) Cobol (b) fortran (c) pascal (d) basic
- In preparing a program, desk-checking and translating are examples of: (a) Coding (b) planning (c) testing (d) documentation
- Which of the following type of error is detected by a language translator? (a) Programming error (b) logical error (c) syntax error (d) both b & c
- Compilers and interpreters are types of : (a) Programming languages (b) language translator (c) alpha testers (d) application generators
- Which of the following is used to design a program using English like statements? (a) Algorithm (b) program flowchart (c) control structures (d) none of these
- During the development of a program drawing a flowchart is a means to: (a) Plan the solution (b) define the problem (c) code the program (d) analyse the problem
- Comments in the program itself are part of: (a) Compiling (b) translating (c) linking (d) documenting
- Which of the following structure is frequently shown in algorithm as an IF…Else statement? (a) Selection control (b) iterative control (c) selective control (d) none of these
- This symbol in a flowchart represents process:
- (a) parallelogram (b) rectangle (c) dimension (d) none of these
- This symbol is used to represent the beginning of a program: (a) Circle (b) oval (c) square (d) pentagon
- In this type of flowchart , only major events are shown: (a) Macro (b) micro (c) system (d) program
- It is a pictorial or graphical presentation : (a) Diagram (b) flowchart (c) sketch (d) Pseudocode
- Which of the following control structures use do..while? (a) Sequence (b) selection (c) iteration (d) none of these
- What does the symbol parallelogram in a flowchart represent? (a) Process (b) predefined process (c) read/write procedures (d) terminal
- What does the symbol dimension in a flowchart represent? (a) Process (b) decision (c) start / strop (d) connectors
- What do you call the step by step solution to a programming problem? (a) Recipe (b) structure chart (c) syntax (d) algorithm
- Which of the following type of flowchart show major and minor events? (a) Micro (b) mini (c) macro (d) none of these
- C++ provides capabilities to do a: (a) Procedural programming (b) non procedural programming
© object oriented programming (d) none of the these
- This can be appear anywhere in the program: (a) Statements (b) comments (c) functions (d) both b & C