Find the output of the following: | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Find the output of the following:

#include <iostream> using namespace std; class T { public: static int a=3; int b=10; }; int Test T :: i; int main() { cout<<sizeof(Test); return 0; }

5th Oct 2022, 3:31 PM
Mahima Bhardwaj
Mahima Bhardwaj - avatar
3 Answers
+ 2
You can find the output if you run your code.
5th Oct 2022, 5:34 PM
Lisa
Lisa - avatar
+ 2
Mahima Bhardwaj So pls edit the question description to indicate that. Never rely on guessing.
9th Oct 2022, 6:40 AM
Emerson Prado
Emerson Prado - avatar
0
I know the answer but i put this question to know the exact reason behind the size of class
6th Oct 2022, 3:23 AM
Mahima Bhardwaj
Mahima Bhardwaj - avatar