Question 475 of 512
Software Development ConceptsmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the program will print "Hello, " with no name. This happens because in BASIC, the INPUT statement reads whatever the user types as a string; when the user presses Enter without typing anything, the variable receives an empty string (""), and the program simply continues to the PRINT statement, which outputs "Hello, " followed by that empty string. On the CompTIA ITF+ FC0-U61 exam, this tests your understanding of empty input behavior programming—specifically, how different languages handle a lack of user input without any explicit validation or loop. A common trap is assuming the program will re-prompt or crash, but BASIC treats an empty entry as a valid string. Memory tip: think of an empty string as an invisible placeholder—it’s still there, just with nothing inside.

FC0-U61 Software Development Concepts Practice Question

This FC0-U61 practice question tests your understanding of software development concepts. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

```
10 PRINT "Enter your name:"
20 INPUT name$
30 IF name$ = "" THEN GOTO 10
40 PRINT "Hello, " + name$
50 END
```

Refer to the exhibit. A developer wrote this BASIC program. What will happen if the user presses Enter without typing a name?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
10 PRINT "Enter your name:"
20 INPUT name$
30 IF name$ = "" THEN GOTO 10
40 PRINT "Hello, " + name$
50 END
```

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The program will prompt for input again.

In BASIC, the INPUT statement reads a string from the user. If the user presses Enter without typing a name, the variable receives an empty string (""). The program then prints "Hello, " followed by that empty string, resulting in "Hello, " with no name. Option C is incorrect because the program does not loop or re-prompt; it simply continues with the empty string.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The program will print "Hello, " with no name.

    Why it's wrong here

    The IF statement prevents reaching line 40 if name$ is empty.

  • The program will display an error message.

    Why it's wrong here

    No error handling is coded; the program just loops.

  • The program will prompt for input again.

    Why this is correct

    The GOTO 10 sends execution back to the input prompt.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The program will end with no output.

    Why it's wrong here

    The program does not end; it loops back to line 10.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may assume an empty input causes an error or no output, but BASIC's INPUT statement treats an empty input as a valid empty string, so the program runs normally and prints "Hello, " with no name.

Detailed technical explanation

How to think about this question

In BASIC, the INPUT statement reads a line of text from the user and assigns it to the variable. When the user presses Enter without typing anything, the input buffer contains only the newline character, and the variable is set to an empty string (length 0). This behavior is consistent across many BASIC dialects (e.g., GW-BASIC, QBasic) and is similar to how Python's input() returns an empty string when Enter is pressed alone. In real-world scenarios, this can lead to subtle bugs if the program expects a non-empty name but does not validate the input.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the FC0-U61 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related FC0-U61 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free FC0-U61 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this FC0-U61 question test?

Software Development Concepts — This question tests Software Development Concepts — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The program will prompt for input again. — In BASIC, the INPUT statement reads a string from the user. If the user presses Enter without typing a name, the variable receives an empty string (""). The program then prints "Hello, " followed by that empty string, resulting in "Hello, " with no name. Option C is incorrect because the program does not loop or re-prompt; it simply continues with the empty string.

What should I do if I get this FC0-U61 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This FC0-U61 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U61 exam.