Curriculum
Course: C basic
Login

Curriculum

C basic

C Introduction

0/1

C Get Started

0/1

C Comments

0/1

C Constants

0/1

C Operators

0/1

C Break and Continue

0/1

C User Input

0/1

C Memory Address

0/1

C Structures

0/1
Text lesson

Multiple Variables

Declare Multiple Variables

To declare multiple variables of identical types, utilize a list separated by commas.

Example

int x = 5, y = 6, z = 50;
printf(“%d”, x + y + z); 

You can also assign identical values to multiple variables of the same type.

Example

int x, y, z;
x = y = z = 50;
printf(“%d”, x + y + z);