National
Computing Challenge



NCC Past Contests and Practice Questions


Practice Questions

Please note: These questions represents simplified versions of questions that may appear on the actual challenge, and they are intended to give an example of the type of logical operations that will be required. 

1. Basic Logic Gate Problem

Introduction: Computers use logic gates to make decisions. An OR gate outputs True if at least one input is True.

Question: What is the output of an OR gate if the inputs are True and False?

Options: A) True
B) False
C) None
D) Both True and False

Solution

Solution: An OR gate outputs True if at least one of the inputs is True. Here, the output is True.

Correct Answer: A) True

2. Data Storage Calculation Problem

Question: A text file contains 200 lines, and each line has 50 characters. How many total characters are in the file?

Options: A) 10,000 characters
B) 8,000 characters
C) 12,000 characters
D) 6,000 characters

Solution

Solution:

Correct Answer: A) 10,000 characters

Explanation: By multiplying the number of lines by the number of characters per line, you find the total number of characters in the file.


3. Assembly Problem

Question: A program runs the following steps:

[0]: Start

[1]: Add 4

[2]: If the value is greater than 5, go to step 4

[3]: Subtract 2

[4]: Add 1

[5]: End


If the starting value is 3, how many steps are executed in total?

Options:


Solution

Solution:

Total steps executed: 5 (including the final step to end the program).

Correct Answer: C) 5

4. Conditional Logic Problem

Question: A program runs the following logic:

What is the result when the input number is 8?

Options:

Solution

Solution: Since 8 is not greater than 10, the program adds 6:

Correct Answer: B) 14

Explanation: The input number 8 is not greater than 10, so the 'otherwise' condition applies, adding 6 to give a result of 14.