GD
SYNTAX
VARIABLES
DATA TYPES
OPERATORS
INPUT
CHALLENGES

Test Your Knowledge

Data Types

You Scored % - /
1. The data type that can store whole numbers is ____.
2. Fractional numbers with up to 7 decimal digits are stored as the ____ data type.
3. The data type that can store more than one character is ____.
4. The data type used to store fractional numbers up to 15 decimal digits is ____.
5. Add the correct data type for the following variables:
myNum = 9;
myDoubleNum = 8.99;
myLetter = 'A';
myBool = false;
myText = "Hello World";
6. Create two boolean variables, named yay and nay, and add appropriate values to them:
= ;
= ;
7. Create a greeting variable, and display the value of it:
= "Hello";
cout << ;
  • main.cpp
 

Download Result

Close File

Your changes will be lost. Are you sure you want to Close the file ?

Save

Do you want to save the file ?

About

Online C++ IDE is a web-based tool powered by ACE code editor. This tool can be used to learn, build, run, test your python script. You can open the script from your local and continue to build using this IDE. Code and output can be downloaded to local.

Keyboard Shortcuts

  • Run Code - F8
  • Save Code - F10
  • Open Editor Command Palette - F1

Report a bug

If you encounter a bug or have questions or suggestions for improvements, please report it via feedback.

Data policy

No data is saved in the server. The code is sent to the server for execution and will be cleared after completion. Shared Code will be saved in the server till the selected expiry period.