⚠️ Notice: This page contains archived content and may reference older versions of C# or .NET. For the latest tutorials, updated examples, and best practices for C# 12 and .NET 8, please visit the latest tutorials ⚠️
 

Variables and DataTypes Exercises

In this chapter you will do some programming exercises of variables and data types in C#. It will help you to improve your programming skills in using variables and data types in C#.

Qu1: Write a program to display user’s complete mailing address. Accept user’s name, city, street, pin and house no. and store it in a variable and display it.
Qu2: Write a program to display student information. Accept Student’s name, Roll no, Age, class, and university name and display it on console.

Summary

After completing this chapter you are able to declaring, initializing and using variables and data types in C# programming. In next session you will learn about different types of C# Operators.