1
You visited us
1
times! Enjoying our articles?
Unlock Full Access!
Byju's Answer
Standard XII
Mathematics
One - One function
Consider the ...
Question
Consider the following function implemented in C:
void printxy (int x, int y)
{
int * ptr;
x = 0;
ptr = &x;
y = *ptr;
*prt = 1;
printf ("%d, %d", x, y);
}
The output of invoking printxy (1, 1) is
Open in App
Solution
Suggest Corrections
0
Similar questions
Q.
What is the output of the following program?
# include <stdio.h>
int main ( )
{
int x = 5;
int * const ptr = &x;
++(*ptr)
printf("%d", x);
return 0;
}
Q.
Consider the following C program:
int x = 0;
void main( )
{
int y = x;
if (x++ < 2)
{
printf ("%d"',x);
main ( );
}
printf ("%d"',y)
}
What is the output of above code?
Q.
Consider the following C code:
void main ( )
{
int x = 1, y = 2, z = 3;
x = (y ++, z++);
y = (x++, z++);
z = (x++, y++);
printf(" %d, %d, %d", x,y,z);
}
What is the output produced by above code?
Q.
Consider the following program.
void main()
{
static int x = 10;
int i = 0;
for (i=0; i<2; i + +)
{
int x = 20;
x = x+1;
}
x=x+1;
printf("%d",x);
}
What is the output of the above program?
Q.
void swap (int m, int n)
{
int x = m;
m = n ;
n = x ;
}
int main( )
{
int x = 5, y = 3;
swap (x,y);
printf("%d%d", x, y);
}
The output of the program is
View More
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
Related Videos
Types of Functions
MATHEMATICS
Watch in App
Explore more
One - One function
Standard XII Mathematics
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
AI Tutor
Textbooks
Question Papers
Install app