Question

What will be the output of the following C code? #include < stdio.h > void main ( ) {     int x = 10, y = 20, *p1 = &x, *p2 = &y;     *p2 = *p1 + *p2;     printf ("%d %d\n", x,
y); }

A 10 20
B 10 30
C 30 10
D Compiler error
E Undefined behavior
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)