What is the output in a 32 bit machine with 32 bit compiler ?
#include <stdio.h>
rer( int **ptr2, int **ptr1)
{
int * ii;
ii = *ptr2;
*ptr2 = *ptr1;
*ptr1 = ii;
**ptr1 *= **ptr2;
**ptr2 += **ptr1;
} void main( )
{
int var1 = 5, var2 = 10;
int *ptr1 = &var1, *ptr2 = &var2;
rer(&ptr1, &ptr2);
printf (“%d %d “, var2, var1);
} |
(A) 60 70
(B) 50 50
(C) 50 60
(D) 60 50
Home Modern › Forums › ISRO › What is the output in a 32 bit machine with 32 bit compiler ? (A) 60 70 What is the output in a 32 bit machine with 32 bit compiler ? (A) 60 70#include <stdio.h>
rer(
int
**ptr2,
int
**ptr1)
{
int
* ii;
ii = *ptr2;
*ptr2 = *ptr1;
*ptr1 = ii;
**ptr1 *= **ptr2;
**ptr2 += **ptr1;
}
void
main( )
{
int
var1 = 5, var2 = 10;
int
*ptr1 = &var1, *ptr2 = &var2;
rer(&ptr1, &ptr2);
printf
(“%d %d “, var2, var1);
}
(B) 50 50
(C) 50 60
(D) 60 50#include <stdio.h>
rer(
int
**ptr2,
int
**ptr1)
{
int
* ii;
ii = *ptr2;
*ptr2 = *ptr1;
*ptr1 = ii;
**ptr1 *= **ptr2;
**ptr2 += **ptr1;
}
void
main( )
{
int
var1 = 5, var2 = 10;
int
*ptr1 = &var1, *ptr2 = &var2;
rer(&ptr1, &ptr2);
printf
(“%d %d “, var2, var1);
}
(B) 50 50
(C) 50 60
(D) 60 50
nan