Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
83 views
in Information Technology by (88.5k points)
closed by

Consider the following C program:

#include <stdio.h>

int jumble (int x, int y)

{

x = 2x + y;

return x;

}

int main ( )

{

int x = 2, y = 5;

y = jumble (y, x);

x = jumble (y, x);

printf("%d\n", x);

}

The value printed by the program is _________.

1 Answer

0 votes
by (85.4k points)
selected by
 
Best answer

main()

jumble(int x, int y)

y = jumble(5, 2)

∴ y = 12

x = 5 and y = 2

x = 2 × 5 + 2 = 12

return 12

x = jumble(12, 2)

∴ x = 26

printf ("%d\n", x); // output 26

x = 12 and y = 2

x = 2 × 12 + 2 = 26

return 26

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...