Exercise: Declaration and Initialization Of Data Types

This exercise will test you on data types and initialization of declared variables in C#.

We'll cover the following

Problem Statement #

  • Declare an integer type variable name intNumber and assign it a value of 30.
  • Declare a float type variable name floatNumber and assign it a value of 30.78.
  • Declare a double type variable name doubleNumber and assign it a value of 45.1234.
  • Declare a bool type variable name boolean and assign it a value of true.
  • Declare a char type variable name charName and assign it a value of u.
  • Lastly, print the values of all declared variables.

Get hands-on with 1200+ tech skills courses.