Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Parameter Passing Material
Recent questions tagged parameter-passing
0
0 votes
0
0 answers
146
146 views
NIELIT Scientific Assistant June 2025 | Question: 83
Which of the following is an example of passing a parameter by reference in $\text{C}?$ void func(int $\text{x}$)void func(int & $\text{x}$)void func(int $\text{x},$ int ...
Shubham Sharma 2
146
views
asked
Jul 24, 2025
Programming and DS
nielit-sta-2025
programming-in-c
parameter-passing
pointers
+
–
4
4 votes
1
1 answer
1.3k
1.3k views
GO Classes Test Series 2024 | Programming | Test 3 | Question: 19
#include<stdio.h int test(int *a, int *b) { int c = *a-*b; if (c<0) return 0; else return (1 + test(&c, b)); } void main() { int x = 15; int y = 4; int a = test(&x,&y); p...
GO Classes
1.3k
views
asked
Apr 30, 2022
Programming in C
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
functions
pointers
parameter-passing
recursion
two-marks
+
–
1
1 vote
2
2 answers
1.0k
1.0k views
NIELIT 2022 April Scientist B | Section B | Question: 76
What is printed by the print statements in the program $\text{P1}$ assuming call by reference parameter passing ?Program P1() { x = 10; y = 3; func1(y, x, x); print x; pr...
soujanyareddy13
1.0k
views
asked
Apr 12, 2022
Programming and DS
nielit2022apr-scientistb
programming-in-c
parameter-passing
data-structures
+
–
1
1 vote
1
1 answer
987
987 views
Self Doubt on scoping
int x = 5, y = 10 ; void main ( ) { int i = 2, j = 3 A (i, j); } void A (int i, int j) { int x = 10, y = 5 ; i = i + x : j = i + y : printf ("%d %d", i, j); B (i, j); } v...
srestha
987
views
asked
Mar 23, 2019
Programming in C
programming-in-c
dynamic-scoping
parameter-passing
+
–
0
0 votes
1
1 answer
1.4k
1.4k views
parameter passing
#include<stdio.h>int fun(int arr[]){ arr=arr+1; printf("%d",arr[0]);}int main(void){ int arr ={10,20}; fun(arr); printf("%d",arr[0]); return 0;}A.COMPIL...
Arun Rout
1.4k
views
asked
Jan 7, 2019
Programming in C
parameter-passing
+
–
0
0 votes
1
1 answer
2.2k
2.2k views
UGC NET CSE | December 2018 | Part 2 | Question: 47
Consider the following two $C++$ programs $P1$ and $P2$ and two statements $S1$ and $S2$ about these programs:$P1$$P2$void f(int a, int *b, int &c){a=1;*b=2;c=3;}int main...
Arjun
2.2k
views
asked
Jan 2, 2019
Programming and DS
ugcnetcse-dec2018-paper2
programming-in-c
parameter-passing
call-by-value
call-by-reference
programming-language-concepts
+
–
6
6 votes
2
answers
2 answers
2.7k
2.7k views
TIFR CSE 2019 | Part B | Question: 8
Consider the following program fragment:var a,b : integer; procedure G(c,d: integer); begin c:=c-d; d:=c+d; c:=d-c end; a:=2; b:=3; G(a,b);If both parameters to $G$ are p...
Arjun
2.7k
views
asked
Dec 18, 2018
Programming in C
tifr2019
programming
parameter-passing
+
–
0
0 votes
1
1 answer
1.8k
1.8k views
Parameter Passing
Predict the Output for both the snippets for the following:1. Call by Value2. Call by Reference3. Call by Need4. Call by Name5. Call by value Result/Call by value Return(...
Balaji Jegan
1.8k
views
asked
Nov 15, 2018
Programming in C
programming-in-c
parameter-passing
+
–
0
0 votes
0
0 answers
911
911 views
parameter passing technique
from below list of parameter passing techniques, which parameter passing technique we can implement in c?1) call by value2) call by refference3) call by value result4) ca...
Rahul_Rathod_
911
views
asked
Oct 3, 2018
Programming in C
parameter-passing
programming
programming-in-c
+
–
0
0 votes
0
0 answers
593
593 views
parameter passing tech
why we use parameter passing technique in C??ORpurpose of using "parameter passing technique"??ORwhat is the advantage of using it in C??
Hira Thakur
593
views
asked
Sep 13, 2018
Programming in C
parameter-passing
+
–
0
0 votes
0
0 answers
822
822 views
Test Series
What is the output.My doubt is : What is meant by call by copy restore ? is it same as call by reference or there is some difference ?
Na462
822
views
asked
May 2, 2018
Programming in C
programming-in-c
parameter-passing
+
–
0
0 votes
0
0 answers
940
940 views
parameter passing techniques
Does C support all passing parameters techniques like call by text, call by copy restore, and call by name?
Rishabh Baghel
940
views
asked
Mar 5, 2018
Programming in C
programming-in-c
parameter-passing
+
–
78
78 votes
7
answers
7 answers
26.5k
26.5k views
GATE CSE 2018 | Question: 29
#include<stdio.h void fun1(char* s1, char* s2){ char* temp; temp = s1; s1 = s2; s2 = temp; } void fun2(char s1, char s2){ char* temp; temp = *s1; *s1 = *s2; *s2 = temp;...
gatecse
26.5k
views
asked
Feb 14, 2018
Programming in C
gatecse-2018
programming-in-c
pointers
parameter-passing
normal
programming
two-marks
+
–
1
1 vote
1
answers
1 answer
1.6k
1.6k views
Virtual Gate Test Series: Programming & DS - Parameter Passing
int f(int &x, int c) { c = c-1; if (c == 0) return 1; x = x +1; return f(x,c) * x; } What is the return value of $f(p,p),$ if the value of $p$ i...
Ahwan
1.6k
views
asked
Aug 20, 2017
Programming in C
programming-in-c
parameter-passing
virtual-gate-test-series
+
–
6
6 votes
1
answers
1 answer
1.2k
1.2k views
Test by Bikram | Mock GATE | Test 2 | Question: 14
Consider the following code snippet.void first(int p, int t) { p += t; t += p; } main() { int p = 4; first(p , p); }What is the final value of $p$ in both call by value a...
Bikram
1.2k
views
asked
Jan 24, 2017
Compiler Design
tbb-mockgate-2
compiler-design
parameter-passing
runtime-environment
+
–
0
0 votes
0
0 answers
1.1k
1.1k views
CALL BY REFERENCE AND CALL BY NAME
foo(a, b, c) { b =b++; a = a++; c = a + b*10 } X=1; Y=2; Z=3; foo(X, Y+2, Z);CAN SOMEONE PLEASE TELL THE OUTPUTS FOR CALL BY REFERENCE AND CALL BY NAME. WHAT IS THE DIFER...
sushmita
1.1k
views
asked
Jan 18, 2017
Compiler Design
programming
parameter-passing
compiler-design
+
–
9
9 votes
2
answers
2 answers
4.0k
4.0k views
Test by Bikram | Mock GATE | Test 1 | Question: 9
Consider the following program fragment :int foo(int ,int ); int a; int ar[4] = { 1,0, 2,3}; main() { a = 0; foo(ar[a], ar[ar[a]]); printf("%d,%d ,%d,%d ", ar[0] , ar ,a...
Bikram
4.0k
views
asked
Jan 16, 2017
GATE
tbb-mockgate-1
parameter-passing
runtime-environment
compiler-design
+
–
8
8 votes
1
1 answer
3.4k
3.4k views
GATE CSE 1988 | Question: 8i
Consider the procedure declaration:Procedure P (k: integer)where the parameter passing mechanism is call-by-value-result. Is it correct if the call, P (A[i]), where A is ...
go_editor
3.4k
views
asked
Dec 19, 2016
Compiler Design
gate1988
descriptive
compiler-design
runtime-environment
parameter-passing
+
–
23
23 votes
1
answers
1 answer
4.0k
4.0k views
GATE CSE 1988 | Question: 2xv
What is printed by following program, assuming call-by reference method of passing parameters for all variables in the parameter list of procedure P?program Main(inout, o...
go_editor
4.0k
views
asked
Dec 19, 2016
Compiler Design
gate1988
descriptive
compiler-design
runtime-environment
parameter-passing
numerical-answers
+
–
6
6 votes
2
answers
2 answers
3.4k
3.4k views
GATE CSE 1990 | Question: 11a
What does the following program output?program module (input, output); var a:array [1...5] of integer; i, j: integer; procedure unknown (var b: integer, var c: integer); ...
Misbah Ghaya
3.4k
views
asked
Nov 25, 2016
Compiler Design
gate1990
descriptive
compiler-design
runtime-environment
parameter-passing
+
–
0
0 votes
2
2 answers
1.3k
1.3k views
Kerala PSC AP Exam
The default parameter passing mechanism of functions is A) Call by ValueB) Call by ReferenceC) Call by ResultD) None of the above
Sankaranarayanan P.N
1.3k
views
asked
Oct 27, 2016
Programming in C
parameter-passing
+
–
7
7 votes
3
answers
3 answers
1.8k
1.8k views
GATE Overflow | Programming | Test 1 | Question: 14
void foo(int x) { int *p = &x; *p = x*x; }The above code is supposed to modify any input integer with its square. Which of the following statements regarding the above co...
Arjun
1.8k
views
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
programming-in-c
parameter-passing
two-marks
+
–
3
3 votes
1
1 answer
2.5k
2.5k views
UGC NET CSE | August 2016 | Part 3 | Question: 21
Assume that the program $‘P’$ is implementing parameter passing with ‘call by reference’. What will be printed by following print statements in $P$?Program P { x=10; y=3;...
Misbah Ghaya
2.5k
views
asked
Oct 1, 2016
Compiler Design
ugcnetcse-aug2016-paper3
parameter-passing
+
–
Page:
1
2
3
next »