Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
void m(int *p, int *q)
{
    int temp = *p; *p = *q; *q = temp;
}
void main()
{
    int a = 6, b = 5;
    m(&a, &b);
    printf("%d %d\n", a, b);
}

A. 5 6

B. 6 5

C. 5 5

D. 6 6

Answer: Option A


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer