Question discussion

What would be the output for the following Turbo C code?#includevoid main(){ int a[]={ 1, 2, 3, 4, 5 }, *p; p=a; ++*p; printf("%d ", *p); p…

310612Medium 1 reply 898 views
61
What would be the output for the following Turbo C code?#include<stdio.h>void main(){ int a[]={ 1, 2, 3, 4, 5 }, *p; p=a; ++*p; printf("%d ", *p); p += 2; printf("%d", *p);}
  • A2 4
  • B3 4
  • C2 2
  • D2 3
  • E3 3
Correct answer: D

Discussion 1

0
CCommunity
2 3