CS FundamentalsModerateTCS NQT · Infosys
A method contains 3 if statements, 1 while loop and 1 for loop, with no && or || operators and no other branching. What is its cyclomatic complexity?
- A. 6
- B. 5
- C. 7
- D. 8
Correct answer: A. 6
V(G) = number of decision points + 1 = (3 + 1 + 1) + 1 = 6.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- After committing by mistake, a developer runs git reset --soft HEAD~1. What is the result?
- A field accepts ages from 18 to 60 inclusive. Which set of test values best applies boundary value analysis?
- In Scrum, who is accountable for ordering the items in the Product Backlog?
- The question "Are we building the right product?" is answered by which activity?
- Which of the following is a typical example of Platform as a Service (PaaS)?
- A class has methods to calculate employee salary, save the employee to a database and print a payslip report. Which SOLID principle does…