Loading...

Loading, please wait...

The Code Concepts
Learning Portal
Prep plan My packages

Practice over 1000+ GATE-level questions from this topic!

Designed to match the latest GATE pattern with topic-wise precision, difficulty tagging, and detailed solutions.

Q#1 FUNCTIONS AND STORAGE CLASSES GATE CSE 0 MSQ +2 marks -0 marks

Consider the following C function definition.

        int f(int x, int y) {

                for (int i =0; i < y; i ++) {

                        x = x + x + y;

                }

                return x;

        }

Which of the following statements is/are TRUE about the above function?

If the inputs are x = 20, y = 10, then the return value is less than 210

If the inputs are x = 20, y = 20, then the return value is greater than 220

If the inputs are x = 20, y = 10, then the return value is greater than 220

If the inputs are x = 10, y = 20. then the return value is greater than 220

Sign in to see the solution

Log in to view the explanation, track your attempts, and keep your progress.

Sign in to Unlock
Browse Practice Questions by Chapters / Topics in Browse Practice Questions by Chapters / Topics in GATE Computer Science
Total Questions

Attempted

% Attempted

Correct

% Correct

Topic Questions Attempted Correct
C Programming and Data Structures 142 0 0
Algorithms 113 0 0
DBMS 13 0 0
Operating Systems (OS) 0 0 0
Computer Networks 22 0 0
CDS 10 0 0
C Programming &amp;amp; Data Structure 22 0 0
20 0 0 0