LogiQuest
Back to Structures, Unions, Enums
9

What will be the output of the program?

#include <stdio.h>
struct P { int a; int b; };
int main(void) {
    struct P p = {1, 2}, q;
    q = p;
    q.a = 9;
    printf("%d %d\n", p.a, q.a);
    return 0;
}
Easy

Discussion (0)

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

Log in to join the discussion.