MCQ 511 MarkIn which of the following statement, the result of the test expression must be of the type taking discrete values?✓ SwitchB ForC IfD WhileAnswerCorrect option: A. SwitchSwitchView full question & answer→
MCQ 521 MarkWhich statement is used when there are many alternative actions to be taken depending upon the value of a variable or expression?✓ SwitchB ForC IfD WhileAnswerCorrect option: A. SwitchSwitchView full question & answer→
MCQ 531 MarkWrite Java statement to assign value ‘A’ to variable ‘grade’.AGrade = A✓Grade = 'A'CGrade = ‘A’DGrade = “A”AnswerCorrect option: B. Grade = 'A'Grade = 'A'View full question & answer→
MCQ 541 MarkWrite Java statement to check whether the value of variable ‘marks’ is greater than or equal to 70.✓If (marks > 70)BIf [marks < 70]CIf (m > 70)DIf (m>=70)AnswerCorrect option: A. If (marks > 70)If (marks > 70)View full question & answer→
MCQ 551 MarkWhat is it called when an ‘if’ statement is used in another ‘if’ statement?✓ Casted — ifB Nested — ifC Inner — ifD Shorted — ifAnswerCorrect option: A. Casted — ifCasted — ifView full question & answer→
MCQ 561 MarkWrite Java statement to check whether the remainder is zero or not when the value of variable x is divided by 2.✓ If (x%2==0)B If (x%2=0)C If (x/2==0)D If ((x/2) =0)AnswerCorrect option: A. If (x%2==0)If (x%2==0)View full question & answer→
MCQ 571 MarkWhat will be used to make it easy to insert other statement?✓ BlockB TypecastingC NestingD None of theseAnswerCorrect option: A. BlockBlockView full question & answer→
MCQ 581 MarkWhat is advisable to use in ‘if’ statement?✓ BlockB TypecastingC NestingD None of theseAnswerCorrect option: A. BlockBlockView full question & answer→
MCQ 591 MarkHow many statements are there as statement in ‘if’ statement?A OneB Block (More than one)✓ a or bD None of theseAnswerCorrect option: C. a or ba or bView full question & answer→
MCQ 601 MarkWhen does it execute a block of statements written after ‘else’ in ‘if’ statement?A When value of Boolean expression is true✓ When value of Boolean expression is falseC When there is no Boolean expression.D None of these of theseAnswerCorrect option: B. When value of Boolean expression is falseWhen value of Boolean expression is falseView full question & answer→
MCQ 611 MarkWhich statement is executed if the value of Boolean expression is true?✓ Statement 1B Statement2C ElseD None of theseAnswerCorrect option: A. Statement 1Statement 1View full question & answer→
MCQ 621 MarkWhat is evaluated first when ‘if’ statement is executed?✓ Boolean expressionB Statement1C Statement2D None of theseAnswerCorrect option: A. Boolean expressionBoolean expressionView full question & answer→
MCQ 631 MarkAs which of the following control structure is the ‘if’ statement known?A BranchingB DecisionC Selective✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 641 MarkWhich of the following statement enables to take one of two alternative courses of action, depending on whether the value of a given Boolean valued expression is true or false?A ForB WhileC Else✓ ifAnswerCorrect option: D. ififView full question & answer→
MCQ 651 MarkA variable declared in one block has nothing to do with a variable with same name as declared in other block.” What can we say about this statement?✓ This statement is true.B This statement is false.C Depends upon data typeD Depends upon Java versionAnswerCorrect option: A. This statement is true.This statement is true.View full question & answer→
MCQ 661 MarkWhat happens when we declare a variable inside other block of program as same name as declared inside in main () method?✓ There will be conflict with both variables and error will be displayed.B Textbox for changing name will be displayed.C Variable will be created.D None of theseAnswerCorrect option: A. There will be conflict with both variables and error will be displayed.There will be conflict with both variables and error will be displayed.View full question & answer→
MCQ 671 MarkWhat happens when we declare a variable with the same name as of the variable in scope?✓ There will be an error.B Another variable will be created with the same name.C Another variable will be created with the different name.D None of theseAnswerCorrect option: A. There will be an error.There will be an error.View full question & answer→
MCQ 681 MarkThe scope of a variable defined inside a block is limited to that block only.” Explain this statement.✓ This statement is true.B This statement is false.C Depends upon Java versionD Depends upon programAnswerCorrect option: A. This statement is true.This statement is true.View full question & answer→
MCQ 691 MarkWhat can a variable to the block be called?A Non-localB Local✓ GlobalD None of theseAnswerCorrect option: C. GlobalGlobalView full question & answer→
MCQ 701 MarkWhat kind of variable is to be when we declare a variable inside a block?A Inaccessible to outside that blockB Invisible✓ Both a and bD None of theseAnswerCorrect option: C. Both a and bBoth a and bView full question & answer→
MCQ 711 MarkWhere does the variable inside a block?✓ Outside the blockB Inside the blockC EverywhereD None of theseAnswerCorrect option: A. Outside the blockOutside the blockView full question & answer→
MCQ 721 MarkWhat kind of variable is to be when we declare a variable inside a block?✓ Local to blockB Local to programC GlobalD None of theseAnswerCorrect option: A. Local to blockLocal to blockView full question & answer→
MCQ 731 MarkWithin which of the following, variables are created with local scope for statements?✓ BlockB Type-castingC NestingD None of theseAnswerCorrect option: A. BlockBlockView full question & answer→
MCQ 741 MarkWhat is used to group related statements logically?✓ BlockB Type-castingC NestingD None of theseAnswerCorrect option: A. BlockBlockView full question & answer→
MCQ 751 MarkA block statement is a group of statements enclosed between the following type of brackets.✓ { }B ( )C [ ]D < >AnswerCorrect option: A. { }{ }View full question & answer→
MCQ 761 MarkWhich of the following control structures are used to determine the normal flow of control in a program?A If statement, switch statementB Do…while loopC For loop, while loop✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 771 MarkWhich of the following is also called selective structure?✓ BranchesB LoopsC FunctionD BlockAnswerCorrect option: A. BranchesBranchesView full question & answer→
MCQ 781 MarkWhich of the following is used to choose among two or more possible courses of action?✓ BranchesB LoopsC FunctionD BlockAnswerCorrect option: A. BranchesBranchesView full question & answer→
MCQ 791 MarkWhich of the following is used to repeat a sequence of statements over and over until some condition occurs?✓ LoopsB BranchesC FunctionD BlockAnswerCorrect option: A. LoopsLoopsView full question & answer→
MCQ 801 MarkWhich are the types of control structure?A LoopsB Branches✓ Both a and bD None of theseAnswerCorrect option: C. Both a and bBoth a and bView full question & answer→
MCQ 811 MarkWhat are those statements known as that enable to control the flow of execution?A Loop structuresB Nested structures✓ Control structuresD None of theseAnswerCorrect option: C. Control structuresControl structuresView full question & answer→
MCQ 821 MarkIn general, how are the statements executed?A Randomly✓ OrderedC DisorderedD In descending orderAnswerCorrect option: B. OrderedOrderedView full question & answer→
MCQ 831 MarkWhich of the following operator has left-to-right associativity?A ++B =C +=✓ /AnswerCorrect option: D. //View full question & answer→
MCQ 841 MarkHow is the expression 72/2/3 treated?✓ (72/2)/3B 72 / (2/3)C (72/3) /2D 72 / (3/2)AnswerCorrect option: A. (72/2)/3(72/2)/3View full question & answer→
MCQ 851 MarkWhich expression is made after evaluating z = 7 in x = y = z✓ x=y=7B y=7C x=y=zD y=zAnswerCorrect option: A. x=y=7x=y=7View full question & answer→
MCQ 861 MarkWhat will be first evaluated in x = y = z = 7?✓ z=7B x=yC y=zD x=7AnswerCorrect option: A. z=7z=7View full question & answer→
MCQ 871 MarkChoose the right associativity of assignment operator.✓ From right to leftB From left to rightC Whatever sideD None of theseAnswerCorrect option: A. From right to leftFrom right to leftView full question & answer→
MCQ 881 MarkFrom x=y=z=7, what to understand of the following, it will give 7 to value of three variables?✓ x = (y = (z = 7))B (x=y) = (z=7)C (x=y=z)=7D (x=y=) z=7AnswerCorrect option: A. x = (y = (z = 7))x = (y = (z = 7))View full question & answer→
MCQ 891 MarkWhich are the operators’ that have highest precedence?A ++, --, !B Unary — and +C Type-cast✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 901 MarkWhich operator has the lowest precedence?✓ Assignment operatorB Conditional operatorC Unary operationD Relational operatorAnswerCorrect option: A. Assignment operatorAssignment operatorView full question & answer→
MCQ 911 MarkWhich operator has the highest precedence?✓ Unary operationB Assignment operatorC Conditional operatorD Relational operatorAnswerCorrect option: A. Unary operationUnary operationView full question & answer→
MCQ 921 MarkWhich of the following operators have the highest precedence?✓ ++, _ _, ! , type-castB , ?, %C =, +=, — =D &&, IIAnswerCorrect option: A. ++, _ _, ! , type-cast++, _ _, ! , type-castView full question & answer→
MCQ 931 Markin which of the following option, associativity is from right-to-left?A Unary operationsB Assignment✓ Both a and bD None of theseAnswerCorrect option: C. Both a and bBoth a and bView full question & answer→
MCQ 941 MarkWhich is the direction of associativity in most of the cases?✓ From left to rightB From right to leftC From right side to the second operator of left sideD From left side to the second operator of right sideAnswerCorrect option: A. From left to rightFrom left to rightView full question & answer→
MCQ 951 MarkWhat does associativity determine?✓ The direction in which operations are performed (Left to Right or Right to Left)B The order in which operations are performedC Both a and bD None of theseAnswerCorrect option: A. The direction in which operations are performed (Left to Right or Right to Left)The direction in which operations are performed (Left to Right or Right to Left)View full question & answer→
MCQ 961 MarkWhich of the following operators have the highest precedence?✓ When two operators having same precedenceB When two operators having different precedenceC When Boolean operators are usedD None of theseAnswerCorrect option: A. When two operators having same precedenceWhen two operators having same precedenceView full question & answer→
MCQ 971 Markin which of the following option, associativity is from right-to-left?A Unary operationsB Assignment✓ Both a and bD None of theseAnswerCorrect option: C. Both a and bBoth a and bView full question & answer→
MCQ 981 MarkWhat does associativity determine?✓ The direction in which operations are performed (Left to Right or Right to Left)B The order in which operations are performedC Both a and bD None of theseAnswerCorrect option: A. The direction in which operations are performed (Left to Right or Right to Left)The direction in which operations are performed (Left to Right or Right to Left)View full question & answer→
MCQ 991 MarkWhen is the expression to be evaluated according to its associativity?✓ When two operators having same precedenceB When two operators having different precedenceC When Boolean operators are usedD None of theseAnswerCorrect option: A. When two operators having same precedenceWhen two operators having same precedenceView full question & answer→
MCQ 1001 MarkWhich of following is used to avoid confusion during calculation?✓ ( )B { }C < >D [ ]AnswerCorrect option: A. ( )( )View full question & answer→