LogiQuest
Back to Structures, Unions, Enums
1

What will be the output of the program?

#include <stdio.h>
struct Point { int x, y; };
int main(void) {
    struct Point p = {3, 4};
    struct Point *q = &p;
    q->x = 10;
    printf("%d %d\n", p.x, q->y);
    return 0;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.