ASDV-Cpp/Assignments/TestQuizQuestions/main.cpp

33 lines
371 B
C++

#include <iostream>
/**
struct A {
int *p;
};
int main() {
A a;
int x = 10;
a.p = &x;
cout << *a.p << endl;
return 0;
}
**/
using namespace std;
struct Rectangle {
int length;
int width;
};
void f1(Rectangle r) {
cout << r.length << " " << r.width << endl;
}
int main() {
Rectangle r;
f1(r);
return 0;
}