Declarations

Learn the C syntax required for declaring variables of different types and .

Declaring a variable in C

Unlike in languages like Python, R, Octave/Matlab, etc., which are dynamically-typed languagesIn a dynamically-typed language, variables types do not have to be declared explicitly and are determined at run time depending on the type of value stored in it., the C language is a statically-typed languageIn a statically-typed language, variable types have to be declared explicitly and are known at compile time. From a practical point of view, this means that in C we have to declare, up front, the type of every variable we use.

In languages like Python we can do crazy stuff like this:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy