Computer Fundamentals Questions and Answers – Structural Programming

This set of Computer Fundamentals Multiple Choice Questions & Answers (MCQs) focuses on “Structural Programming”.

1. Programming based on stepwise refinement process.
a) Structural
b) C programming
c) Procedural
d) Fine
View Answer

Answer: a
Explanation: Structured programming is based on the stepwise refinement process-a method of problem decomposition common to all engineering disciplines and the physical, chemical, and biological sciences.

2. Top-down approach is followed in structural programming.
a) True
b) False
View Answer

Answer: a
Explanation: The statement is true. Structural programming follows the top – down approach. Each module is further divided into sub modules.

3. A ________ is a directed graph that describes the flow of execution control of the program.
a) Flowchart
b) Flow graph
c) Complexity curve
d) Algorithm
View Answer

Answer: a
Explanation: A flowchart is a directed graph. It simply describes the flow of execution control of the program.
advertisement
advertisement

4. A program should be ________
a) Secure
b) Sequential
c) Ordered
d) Simple
View Answer

Answer: b
Explanation: It is natural to write a program as a sequence of program structures such as sequences, choices and loops.

5. The following is the syntax for:

Note: Join free Sanfoundry classes at Telegram or Youtube
      ____(condition)
	action

a) Else
b) Elif
c) If
d) Switch
View Answer

Answer: c
Explanation: The if statement follows that syntax. If is a choice statement. Else is also a choice statement.
advertisement

6. Which of the following is a loop statement?
a) IF
b) ELSE
c) WHILE
d) DO
View Answer

Answer: c
Explanation: WHILE is a loop statement.
Syntax : while(condition)
action.

7. What is the correct syntax of for statement?
a) for(initialization;condition;update)
b) for(initialization,condition,update)
c) for(condition;initialization;update)
d) for(initialization;condition;)
View Answer

Answer: a
Explanation: The correct syntax is : for(initialization;condition;update)
For is another loop statement.
advertisement

8. Semicolon is used after :
a) Function definition
b) Function call
c) for loop
d) while loop
View Answer

Answer: b
Explanation: Semicolon is used after function call otherwise it leads to compile-time errors. It shouldn’t be used after definitions. It should also not be used after loops.

9. The number of values a function can return at a time?
a) 1
b) 0
c) 2
d) more than 2
View Answer

Answer: a
Explanation: A function can return only one value at a time.
Syntax : return (x,12);

10. Which of the following isn’t a loop statement?
a) for
b) elif
c) while
d) do-while
View Answer

Answer: b
Explanation: The answer is elif. Elif isn’t a loop statement. It is a part of a choice statement.

Sanfoundry Global Education & Learning Series – Computer Fundamentals.

To practice all areas of Computer Fundamentals, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.