0
Output of C++ code
Can someone explain how this code works? Also, why does it issue a warning in the C compiler but not the C++ compiler? #include <iostream> using namespace std; int main() { int a[][3]={1,2,3,4,5,6}; int (*ptr)[3] = a; printf("%d %d ", (*ptr)[1], (*ptr)[2]); ++ptr; printf("%d %d",(*ptr)[1], (*ptr)[2]); return 0; } https://code.sololearn.com/cIp2L0q5kGua/#cpp
1 Antwort
0
Here u uses iostream header file which belongs to c++