Question
#include <iostream>
using namespace std;
int main()
{
int num1 = 10;
float num2 = 20;
cout << sizeof(num1 + num2);
return 0;
}
a.
2
b.
4
c.
8
d.
garbage
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of the following program?
Similar Questions
Discover Related MCQs
Q. Which of the following will not return a value?
View solution
Q. ____ have the return type void?
View solution
Q. What does the following statement mean?
void a;
View solution
Q. Choose the incorrect option
View solution
Q. Identify the incorrect option.
View solution
Q. In which type does the enumerators are stored by the compiler?
View solution
Q. To which of these enumerators can be assigned?
View solution
Q. What will happen when defining the enumerated type?
View solution
Q. Which variable does equals in size with enum variable?
View solution
Q. Choose the correct option.
extern int i;
int i;
View solution
Q. Pick the right option:
Statement 1:A definition is also a declaration.
Statement 2:An identifier can be declared just once.
View solution
Q. Which of the given statements are false.
1. extern int func;
2. extern int func2(int,int);
3. int func2(int,int);
4. extern class foo;
View solution
Q. Pick the right option:
Statement 1:Global values are not initialized by the stream.
Statement 2:Local values are implicitly initialised to 0.
View solution
Q. Can two functions declare variables(non static) with the same name.
View solution
Q. Identify the incorrect statements.
int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&var = 40; //statement 3
View solution
Q. Identify the type of the variables.
typedef char* CHAR;
CHAR p,q;
View solution
Q. Evaluate the following expression:
3 >6&&7>4
View solution
Q. Special data types that are defined by users is called
View solution
Q. In C++ the words that is already defined and is reserved for a single special purpose, is called as
View solution
Q. There are how many relational operator are offered by C++?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!