0
Does this code gives size of variable i.e based upon operator ....does it give size of operations
#include <iostream> using namespace std; int main() { cout << "char: " << sizeof(char) << endl; cout << "int: " << sizeof(int) << endl; cout << "float: " << sizeof(float) << endl; cout << "double: " << sizeof(double) << endl; int var = 50; cout << "var: " << sizeof(var) << endl; int a,b,c; int a=10; int b= 20; int c= 30; cout<< "value of sum"<< a+b+c<< endl; cout << a+b+c<< sizeof(b)<<endl; return 0; }
2 ответов
+ 3
Please share the code
https://www.sololearn.com/discuss/1316935/?ref=app
+ 1
Wikipedia gives detailed explanation of this operator:
https://en.m.wikipedia.org/wiki/Sizeof