Computer Sciences > Gate 2019 > Functions
Consider the following C program:
The value printed by program is __________
#include <stdio.h>
int jumble(int x, int y) {
x = 2 * x + y;
return x;
}
int main() {
int x = 2, y = 5;
y = jumble(y, x);
x = jumble(y, x);
printf("%d ", x);
return 0;
}
int jumble(int x, int y) {
x = 2 * x + y;
return x;
}
int main() {
int x = 2, y = 5;
y = jumble(y, x);
x = jumble(y, x);
printf("%d ", x);
return 0;
}
The value printed by program is __________
Correct : a
Similar Questions
The following function computes the maximum value contained in an integer array p[] of size n (n >= 1)
int max(int *p, int n)
{
int a=0, b=n...
Consider the following C program.
void f(int, short);
void main()
{
int i = 100;
short s = 12;
short *p = &s;
&...
Consider the following function implemented in C:
void printxy(int x, int y)
{
int *ptr;
x = 0;
ptr = &x;...
Total Unique Visitors
Loading......