City Guilds Model Questions Vol1 2017 Information Technology Question 15

Practice objective / multiple choice question 15 from the 2017 City Guilds Model Questions Vol1 Information Technology examination.

City Guilds Model Questions Vol1 2017 Information Technology Objective / Multiple Choice Hard Difficulty
Question 15 CITY_GUILDS_MODEL_QUESTIONS_VOL1 • 2017 • INFORMATION_TECHNOLOGY • objective

Consider the following function written in a C‑like language:\ \ ``` int f(int n){ int sum = 0; for(int i = 1; i <= n; i++){ int term = i; for(int j = i; j <= n; j++){ term = term * j; } sum = sum + term; } return sum; } ```\ What integer value does the function return when it is called with \(n = 4\)?

Answer Options

A. 100
B. 64
C. 148
Correct Answer D. 124
Correct Answer
D
Correct Option:
124

About This Question

This is City Guilds Model Questions Vol1 2017 Information Technology Question 15. It is one of the objective questions from the 2017 City Guilds Model Questions Vol1 Information Technology examination.

Difficulty level: Hard .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support