What will be the output of the following C++ code?#include using namespace std;int main(){double a = 21.09399;float b = 10.20;int c ;c = (int) a;cout

🎲 Try a Random Question  |  Total Questions in Quiz: 180  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
C++ Programming Practice Test: Source Files, Classes and Operator Overloading in C++ — practice the complete quiz, review flashcards, or try a random question.

Quiz on C++ classes and functions, fiend function, objects and operators, operator overloading, constructors and destructors, subscripting and dereferencing and other string classes. Here is some information about source files, classes, and operator overloading in C++: Source files: These are the files that contain the code for a C++ program. They are typically named with a .cpp extension. Classes: Classes are a way to create user-defined data types in C++. They can contain data members and member functions. Operator overloading: This is a feature of C++ that allows you to change the... Show more

What will be the output of the following C++ code?<br>#include <iostream><br>using namespace std;<br>int main()<br>{<br>double a = 21.09399;<br>float b = 10.20;<br>int c ;<br>c = (int) a;<br>cout << c ;<br>c = (int) b;<br>cout << c ;<br>return 0;<br>}