
LogicMaster - Set I
Authored by Vani Agrawal
Computers
University
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following logic?
Take a number N as input.
If N is even, divide it by 2.
If N is odd, multiply it by 3 and add 1.
Repeat the process until N becomes 1.
What is the sequence if N = 7?
7 → 22 → 11 → 34 → 17 → 52 → 26 → 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
7 → 21 → 10 → 5 → 16 → 8 → 4 → 2 → 1
7 → 3 → 10 → 5 → 1
7 → 14 → 28 → 56 → 1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a number X is passed through the following steps:
1. Multiply by 3
2. Subtract 4
3. Divide by 2
4. Add 5
What is the output if X = 6?
11
12
13
14
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A program runs without errors but produces incorrect output in certain cases. What type of bug is this?
Syntax Error
Runtime Error
Logical Error
Compiler Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to efficiently find the unique number in an array where every number appears twice except one?
Sort the array and check adjacent pairs
Use a hash table to store occurrences
Perform a bitwise XOR operation across all elements
Use two nested loops to compare each element
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are writing a function that sorts a nearly sorted array, where each element is at most 5 positions away from its correct place. What sorting algorithm will be the most efficient?
Quick Sort
Bubble Sort
Heap Sort
Insertion Sort
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
There are N people standing in a circle, and every k-th person is eliminated. The process continues until only one person remains. What is the best approach to solve this problem?
Brute force simulation
Recursion
Mathematical formula
Both (b) and (c)
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
int x = 5;
x = x++;
print(x);
What value of x will be printed?
5
6
7
8
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
6-文件操作
Quiz
•
University
10 questions
ระบบทางเทคโนโลยี ม.4
Quiz
•
10th Grade - University
10 questions
Listen in Python
Quiz
•
University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
10 questions
Introduction to AI - Healthcare & Business
Quiz
•
University - Professi...
10 questions
Perkakasan Multimedia
Quiz
•
University
11 questions
Arduino - Contador
Quiz
•
9th Grade - University
10 questions
CHAPTER 1: COMPUTER SECURITY REVIEW
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University