0
Help me correct this code
#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 Respuestas
+ 1
You don't need to put 'int' for 'a' after you declare it, you should just asign it with a = 10 without 'int'
+ 1
Thnx